2 ms·
This article doesn't talk at all about safety, which is one gigantic advantage modern statically typed languages have over traditional dynamically typed ones.
by pmoriarty 9y ago
This article doesn't talk at all about safety, which is one gigantic advantage modern statically typed languages have over traditional dynamically typed ones.
It also doesn't talk at all about the pain of having to wrestle with the compiler in statically typed languages in order to get the damn thing to compile, nor with having to deal with inscrutable error messages that sometimes need years of type theory courses under your belt to understand.
- aaronchall 9y agoDiscussing "safety" isn't safe unless you properly define your terms. That is, otherwise, you don't know what type of "safe" people will interpret your words to mean. (Sorry, tongue got stuck in my cheek.) Of course, you probably mean type-safety? For example, if you try to add an integer and a string in Python you'll get a TypeError. Hindley Milner proves that we can infer the most general type of a program. I wonder if your concerns about safety are misplaced, but then I think of languages where one can add 1 and '1' and then I think you've certainly got a point.
- f00_ 9y agophp for example(?) type casting there always seems horrible
- fulafel 9y agoTo me the interesting axis of safety in a program like this is IO errors (both input file and stdout), since those weren't covered by the specified failure cases and isn't covered by the likely casual testing that the developer will do. Python will throw an exception and stop the program since there is no IO exception handling, but what will the ML programs do? edit: I was wrong wrt output & Python: Python will report the exception but return a successful exit status (as tested by "python3 -c 'print(42)' > /dev/full")