|
|
|
|
|
by kevingadd
5287 days ago
|
|
Calling your example logical and obvious is only logical and obvious if you're completely trapped within the JS mindset. It's the same as how people defend the absurd semantics of Visual Basic and PHP. It's fine if you like it, but to claim that it's objectively okay is just not supported by fact. It's also worth considering that even if every language has 'gotchas', some of them have far worse gotchas than others. It is worthwhile to choose a starting language that teaches the fewest bad habits and the fewest bizarre rules so that people can easily learn new languages. |
|
Either '5' - 3 results in an error of some kind, or it evaluates to 2. There is no other logical outcome. Javascript chooses to do the latter.
I also disagree that starting language matters. It's like saying you need to have a steinway grand to learn the piano properly.
Learning is about learning what not to do just as much, if not more, than what to do.
Also if you learn to swim through syrup, imagine how fast you'll be when you try swimming through water...