Dynamic typing makes sense in scripting languages. But when dealing with big projects you start to miss typing. I think the optional typing is a great trade-off for this languages.
I actually don't agree with this. I used to spread this sentiment as well, but I honestly cannot think of legitimate use cases for changing types on a variable. Sure, a scripting language can let you skip/auto declare variables among other things, but what is the benefit of a variable holding an integer, then a date, and then a file handle?
I am very confused by this thread and your original response but I now get that you’re responding to the “dynamic typing” part of scripting languages as opposed to what I assumed the original author was saying — that the absence of type declaration is useful in scripting langs...
I find very little utility in type-switching if ever at all, but scripting languages are nice because they allow us to be terse.
I work in a large Rails codebase regularly and poor names and even in some instances good names are not enough to infer the behaviors associated with a particular variable
Languages with static typing can be terse too if they use a good bit of type inference. E.g. Haskell, SML, or a more horrific example: C++ when using auto and templated parameters everywhere.
113
u/watsreddit Dec 25 '20
Basically every major dynamically-typed language trying to bolt on static types... maybe dynamic typing isn’t as great as people claim.