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

> The older I get, the more I appreciate dynamic languages. Fuck, I said it. Fight me.

I see this in myself also. Static typing is such a fever at work especially amongst juniors and mids. Sometimes it’s almost as if they believe object types will spontaneously change at runtime, unpredictability.



But that’s exactly the point. It is too easy to introduce a code change that effectively will unpredictably (because it was unintended) change a type to something unexpected. And then blow up much later in spectacular ways.

Try writing something asynchronous in python with futures and complex nested data types. See how long you enjoy being told that you’re trying to look up a key in something that doesn’t seem to be a dictionary before you switch to static typing with mypy, and can spend your energy on solving the real problems.

I’ve been programming for way over 20 years, and I do not understand how people enjoy debugging something that the compiler would just tell them.


I get all that, however I am saying that they’re being superstitious about it. I’ve been programming at least 20 years and thoroughly love programming in a dynamic language. My preferred being Common Lisp.


Common Lisp is great.

That said, the reason I like static languages for teams is where the "burden of proof" lies. With dynamic languages, the default being rather loosey goosey means my colleague writes a function that "asks" whether the thing handed to it is a list or an object and I have to somehow convince them that it should just take a single type, for consistency's sake... but with a static language even though people try probably exactly the same amount of weird, shit, it sticks out like a sore thumb and needs justification to include in the first place.


Better refactoring tools alone make static typing worthwhile


I’m operations focused (traditionally Sysadmin but I can code to a decent degree and do professionally) but I suspect we’ve all been bitten by something being inferred we didn’t expect.

YAML interpreting NO (Norway’s country code) as false being the most immediately obvious.

Bash has a lot of these kinds of issues too, I don’t remember all the rules so I quote everything to be safe and still get bitten by variable expansion sometimes.

Types that change depending on what the value is: that scares me.




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

Search: