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

Yeah, to me the moral of the story was write more tests.


If you encode your test in a type then you don't have to write it separately. Even in python you can use types for this sort of thing it will blow up at runtime but so will your test. Just have a US Money type that won't return a number unless you call as_cents() or as_dollars(). Now much harder to misuse.




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

Search: