And how would you describe your political tendencies? I have a theory that more MLs are gonna be into static typing and more anarchists are gonna be into dynamic typing.
And how would you describe your political tendencies? I have a theory that more MLs are gonna be into static typing and more anarchists are gonna be into dynamic typing.
Static is always better than dynamic.
You haven’t felt true pain than trying to debug a 20 year old Perl script to find out that someone accidentally passed in one to many zeros to a function which caused all the arguments to be off by one and the dynamic checker just rolled with it and blew up silently.
I think making dynamic languages so common for web apps is the real sin tbh, so many different types of data to deal with, where casting between different data types often causes unsound states and horrible inconsistencies. I'd go to bat in favor of dynamic typing for writing small scripts for automating simple tasks, but I have no clue how it became the standard for everything.
It's because Python and JS became the big web development languages and both of them use dynamic typing. Though Python tries to do a sort of inferred typing system with PEP standards and now type hinting.
I think in principle, having a loosely typed language is good, but in practice no one really follows the rules well enough. It puts too much trust in the programmer to do type checking themselves.
It would be best if it was static by default, and allowed for dynamic types to exist for handling weird inputs gracefully instead of immediately throwing type errors.