3 ms·
>>> Typed languages are better when you're working on a team of people with various experience levels I picked up the opposite qualm after working in a multi m
by user5994461 6y ago
>>> Typed languages are better when you're working on a team of people with various experience levels
I picked up the opposite qualm after working in a multi million line codebase in python, that goes back almost 2 decades in a large bank.
Dynamically typed languages actually work, at all scale.
Statically typed languages are good for simple types (int/string) but they're catastrophic for complex types (dict, map, database tables, enum, nullable/optional). The guarantee it gives you on simple code is great but the convolution it forces you to go through for more complex data is equally horrific.
- skohan 6y agoI think it depends on the type system. After working with languages with good inference, explicit nullability, and algebraic types, it feels extremely tedious to go back to un-typed or duck-typed languages. With a language like python, you spend a tiny bit less time typing out types in the source code, but that savings is totally eclipsed by the extra time you need to spend reading through documentation and source files to make up for the information which is missing from function signatures, and the time you spend chasing down bugs at runtime.
- hyperpallium2 6y agoThe big benefits are types-as-documentation and automated tooling.
- IshKebab 6y agoI strongly disagree. Static types have so many benefits they easily outweigh the only downside (you have to actually write them). I'm sure it's possible to make large dynamically typed codebases work with a lot of effort and a ridiculous amount of testing but it would clearly be easier with static types. There's a reason Typescript is so popular and pretty much every dynamically typed language has some effort to add type hints (including Python!). There's also a reason why you see so many blog posts about large dynamically typed code bases being converted to statically typed languages or having type hints added (e.g. Dropbox) but I don't think I've seen a single large company go the other way, because that would be crazy.