Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi, Can you elaborate a little more on some use-cases or some examples from your troubles?. Am writing a web application(moderately complex) in python and find myself annoyed by the amount of unit test cases needed. My reaction so far has been to write them whenever i seem to test more than a couple of times. But, have a feeling dynamic typing is actually creating problems by enlarging the number of test cases. Don't know enough haskell to comment on it's type system, but curious to learn. P.S: Feel free to mail me, if you don't want it to be blog post.


There are plenty of cases where a data type doesn't sufficiently capture semantics, and without static typing, Python isn't very well built for checking that values have the right semantic type. A float could mean money or time or a percentage; a string could be plain text or HTML or JavaScript or a filename.

The really really hard part is still checking that a given page "isn't broken"—something that's easy for a human to spot but hard for a computer—for all possible combinations of state. But very strict typing would at least make the output less likely to break.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: