3 ms·
I'm a fairly experienced programmer and JS still drives me up the wall. The implicit casting and inconsistent operator overloads have led to many unhappy visits
by laconian 15y ago
I'm a fairly experienced programmer and JS still drives me up the wall. The implicit casting and inconsistent operator overloads have led to many unhappy visits to Stack Overflow to see just WTF my browser is doing. I can't imagine the experience being any better for newbie programmers! Even simple things, like bitwise operators, are basically broken unless you take care to ensure that your variables are coerced to whole numbers, because all numerics are f%!#^&ing floating point numbers...
Given that the language is such a mess, I think it would induce a new programmer to compartmentalize their JS learnings as a bunch of special case hacks instead of discovering broad language principles that are applied consistently across the language.
- cageface 15y agoPython seems to me like an infinitely better choice. Every language has its warts but bringing up a new generation on a language that even the author admits was a quick and dirty hack takes "worse is better" cynicism way too far.
- showell30 15y agoI like Python too, and the current CS curriculum on Khan is mostly, if not completely, based on Python.
- RyanMcGreal 15y agoThe secret to enjoying Javascript is to stick to the non-brain-damaged subset identified by Crockford in his Javasript:The Good Parts. For example, if you always use the triple-equals comparison operator, you don't have to worry (as much) about implicit type coercion.