Hacker News new | ask | show | jobs
by clusterfoo 4243 days ago
> “The `class` keyword will probably be the most harmful feature in JavaScript."

I'm glad I'm not the only one.

One of the reasons Javascript became so popular is that it took many of the properties that Lispers have been extolling for decades (minimal syntax, light-weight, meta-programmable, functional, composable), but wrapped them in a familiar-enough looking package that even beginners can Get Stuff Done. (Which is where Lisps have historically failed.)

I'm hoping the future of Js will continue in this direction, but looking at ES6 and Angular, it looks like too many people are trying to turn Javascript into Java.

The heart of Javascript is simplicity and power. Arrow functions and modules are a great addition. Maybe with enough support from the community, instead of more syntactic sugar and complexity, ES7 will adopt macros (http://sweetjs.org/) and a type system (e.g tcomb ( https://github.com/gcanti/tcomb )).

2 comments

Off topic: tcomb looks insanely cool. Thanks for pointing it out. Though HN is including one of the parens in your link, which is messing it up. Here's a pristine version for the lazy: https://github.com/gcanti/tcomb
> "I'm glad I'm not the only one"

You're not the only one, but we're being steamrolled by the Java crowd and I'm afraid that we're in a losing position. Angular is the first of many to come.