Ah Python, you have spoiled me for all other languages
Grant Edwards
invalid at invalid.invalid
Fri May 22 13:47:39 EDT 2015
On 2015-05-22, Steven D'Aprano <steve at pearwood.info> wrote:
> But Javascript...
>
> Javascript also lacks a standard assert mechanism, but that wasn't
> too hard to fix. It also has two different equality operators, each
> of which are so complicated and confusing that apparently there are
> two-year Masters degrees on them[2], and yet with neither of these
> operators does the array [1, 2] equal the array [1, 2].
Yep, Javascript has a few warts.
* Implicit conversions. A problem common to many languages, so most
of us have learned to deal with it.
* The attempt to make semicolons optional was a failure and should
have been abandoned.
* Lack of block-scope. For some reason, it doesn't bother me in
Python, but it does in Javascript. That probably has something to do
with...
* Hoisting. Hoisting isn't intrinsically bad, but there's something
just a bit off about Javascript's hoisting. I can't quite put my
finger on why, but it trips me up.
* The == operator. It rarely does what you want. Just don't use it.
* When used in a browser, the rather odd meanings of 'this' in
certain situations.
I do like the use of closures.
And of course, the truly _great_ thing about Javascript is...
It's not PHP!
--
Grant Edwards grant.b.edwards Yow! Am I having fun yet?
at
gmail.com
More information about the Python-list
mailing list