Hacker News new | ask | show | jobs
by dragonwriter 2028 days ago
> Automatic casting behavior between the core types

This is (mostly) awesome for quick/light glue scripting and a (almost entirely) a horrible pain for most other programming. As the scale of JS apps has gone up, this has gone from probably being a net win from the way JS was used early on on the web to being a net harm.

> Distinction between undefined and null

This existence of this distinction is, IMO, a very good thing, but there's some big ergonomic issues with the implementation. (The rest of your list I agree with.)

1 comments

Netscape 2.0:

    "foo" - 1
    //raises "is not a numeric literal"
    "" == false
    //raises "is not a numeric literal"

    "foo" + new Object()
    //"foonull"
    "foo" + new Array()
    //"foonull"

    0 + true
    //1
    0 + false
    //0

    1 + new Array()
    //raises "null is not a number"
    new Object + new Object
    //raises "null is not a number"

    true.foo
    //raises "true has no properties"
    1..foo
    //raises "1 has no properties"
Ten days language was not that silent.