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

I agree. I'm often baffled by some developers who seem to think dynamic typing is a minefield that inevitably goes wrong all the time. I note these are almost always Javascript programmers, though. In practice, experience developers in dynamic languages like Python, Lisp etc. rarely make such errors. The number of bugs we deal with that would have been caught early by static typing are vanishingly small.

The best argument I've heard for doing type annotation is for documentation purposes to help future devs. But I don't completely buy this either. I touch new codebases all the time and I rarely spend much time thinking about what types will be passed. I can only assume it comes with experience.

Type annotation actually ends up taking a hell of a long time to do and is of questionable benefit if some of the codebase is not annotated. People spend sometimes hours just trying to get the type checker to say OK for code that actually works just fine!



It's okay if you're working on a blog site, less so if you're working on an air-planes autopilot.



Sure and I know people who write Python that goes into space too, but it doesn't mean it'd the norm or even a good idea




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

Search: