Hacker News new | past | comments | ask | show | jobs | submit login

> Hi. I'm interested in type theory, and I'm a big fan of JS.

fan of JS as a whole package (Language, ecosystem, ...) or JS only as a language? The whole package is very attractive, and I can see how people accept ES5 (the language) for the opportunity to work with JS the ecosystem.

JS the language I think has some cool features and with ES6 it's even an acceptable language to work with, but I just fail to come to terms with some of the smaller warts. The feeling I'm looking for in a language is "this is carefully designed to be consistent, simple and free of idiosyncraces and suprises". With equality, scoping, coercions etc in ES5 that realy is NOT the feeling. ES6 is so much better, but once you pick an ES5 alternative there are so many other choices.

> JS was a pretty good compromise between power and simplicity.

I really don't get why people think JS is "simple" though. It's fantastically complicated. Mostly accidentally though., because of the little warts in scoping/equality/coercion etc. Again, ES6 is a lot better - but still very very not simple compared to e.g. Java.




Imagine a program to implement JS vs Java. Which would be shorter?

That's why it seems fair to say that JS is much simpler than Java.


At the very least, the size of the standards of the two are comparable. JS is far too inconsistent to be truly simple

https://www.ecma-international.org/publications/files/ECMA-S...

https://docs.oracle.com/javase/specs/jls/se9/jls9.pdf


I don't think that's a particularly good way to judge the problem though. Sure, the JavaScript example might be shorter, but which implementation is safer? Which is going to be easier to work with in the future? I'd make the assertion that the JavaScript version will have a lot more edge cases that could have been caught sooner with a more robust type system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: