Comment

Comment by pcwalton

> lack of module system

ES6 fixes this with, well, a module system.

> weak-typing,

Yup, this is a problem.

> verbose function syntax,

ES6 fixes this with arrow functions.

> late binding

Does this just mean dynamic typing? Well, yes, JavaScript is dynamically typed, but I wouldn't call that a language flaw. Static vs. dynamic typing is a tradeoff.

> which has led to the creation of various static analysis tools to alleviate this language flaw

The footnote talks about JSLint and friends, but none of those impose a type system, which means that they do nothing about dynamic typing.

> but with limited success (there is even a static type checker)

Well, yeah. It's very hard (read: "research problem") to impose a good static typechecker on a dynamically typed system, though.

> finicky equality/automatic conversion

Yeah, this is bad. I really wish tools like restrict mode [1] had caught on: together with ES6 they eliminate a lot of what people dislike about JavaScript.

> this behaviour,

Fixed in ES6 if you use arrow functions (finally!)

> and lack of static types.

Again, I wouldn't say it "sucks" for this reason, just that it's dynamically typed. That's a tradeoff.

[1]: http://restrictmode.org/

parent pcwalton 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton