News for hackers. Stuff that matters.
Re:What else are we getting wrong about programming languages? by pjc50 on Sunday October 30, 2016 @05:04PM (#12832267)
Types are not for efficiency of programmer or machine, they're for correctness. They're a form of test that can be run statically on the program. And unlike tests, they potentially offer a proof that some kinds of error cannot occur.

Without types you end up with a different sort of monstrosity - the corner cases that you get when comparing ints to strings in Javascript, for example.

Re:What else are we getting wrong about programming languages? by pitaj on Sunday October 30, 2016 @05:13PM (#12832344)
That's a bad example, as it has really nothing to do with types, but instead the semantics of the coercion-implicit equality operator (==) vs the strict equality operator (===). Javascript has types, they are just dynamic, tied to values, not variables.
Re:What else are we getting wrong about programming languages? by edejong on Sunday October 30, 2016 @05:54PM (#12832593)
I don't think it's such a bad example. In a strongly typed language, it would be relatively difficult to 'type' the '==' operator which would be reflected by its horrific signature. The '===' operator, especially in language supporting type classes, would instead be relatively easy to define. The type indicates whether a concept, which might seem simple, is complex.

However, where static languages are lacking is in supplying proof of the rules associated with these operators. In the case of equality, that would be associativity, reflexivity and transitivity.