3 ms·
I think, the big issue with dynamic typing in popular languages like PHP and JavaScript are the automatic conversions.
by k__ 5y ago
I think, the big issue with dynamic typing in popular languages like PHP and JavaScript are the automatic conversions.
- elwell 5y agoWhich is less of a concern considering Clojure's focus on immutability.
- k__ 5y agoThat's what I meant. As far as I know, some dynamic languages like Python don't have that issue.
- dgb23 5y agoYou mean implicit type conversions? That's a thing you can get somewhat used to. But it throws off beginners and can introduce super weird bugs, because they hide bugs in weird ways, even if you are more experienced. Yes, I find strong typing strictly better than weak typing. An even better example of this would be Excel, the horror stories are almost incredible. So even if your environment is dynamic, you want clarity when you made a mistake. Handling errors gracefully and hiding them are very different things. The optimal in a dynamic world is to facilitate reasoning while not restricting expression.
- dangerbird2 5y agoIt's always worth reminding folks that weak typing and implicit conversions can plague statically typed languages. C's implicit pointer array-to-pointer and pointer-type conversions are a major source of bugs for beginner and experienced programmers alike.
- robertlagrant 5y agoThis is a consequence of weak typing rather than dynamic typing. I appreciate that these are not precise terms, but being able to change something's type (dynamic) is different to the language just doing strange things when you combine types (weak).