3 ms·
> Bizarrely, I misread it as an overcomplicated ASCII art divider. No worries! > Strict mode then gives you slightly better protection than in many otherwise
by wtbob 11y ago
> Bizarrely, I misread it as an overcomplicated ASCII art divider.
No worries!
> Strict mode then gives you slightly better protection than in many otherwise more robust languages (Python and Ruby, for example).
I really dislike that aspect of Python; IMHO it's a pretty bad flaw.
> On the ASI side, I don't see how it can be 'incorrect'
I think it's incorrect in the sense that it's such a bad design that the Right Thing to do is to always use semicolons manually (with the corollary that if the design is such that one never uses them — as with Go — then it must be correct).
> I'm assuming by generic functions you're talking about eg. Clojure protocols or Haskell typeclass functions or stuff like that
I'm thinking Lisp's multimethods. Behaviour doesn't really belong to one object or another, an uniquely privileging the first argument is just weird.
> I return to my main point - no, JS is not a great piece of language design, but it's hardly 'nuke from orbit' bad.
If it weren't for the installed base, I think JavaScript would be only two steps ahead of INTERCAL …