Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JS has an ungainly syntax, but then so do many other languages. I have been really surprised at how nice it is to work with a transpiler for JS (I do a lot of CS these days). One of my first jobs was working with CFront, which was a gigantic hassle so I was a bit apprehensive about moving to CS. Nevertheless I think it hits quite a nice sweet spot of giving you nice syntax but not being so different from JS that you forget what you're doing.

As for pitfalls, most languages also have pitfalls. The "this" convention in JS is downright weird, but I've actually used it to my advantage (admittedly only once). The only other thing I can really think of that is actively hostile is automatic coersion of various types.

The core of JS is actually quite small and elegant, though (IMHO). I really like the prototypical inheritance. Once you understand how it works, it is very flexible and easy to work with. It lacks a lot of explicit facilities, but it is usually very easy to implement them if you want.

The main thing JS lacks is decent standard library. The recent Ecma script standards are moving in the right direction, but it is slow progress (understandably).

I've worked professionally with FORTH, C, C++, Perl, C#, Java, Ruby, Go and probably a few more which I'm forgetting. When I'm programming in Coffeescript, I never feel like I'm missing out. When I'm programming in JS, I'm frustrated by all the parens and "function"s that I have to type, but otherwise quite content. I like types, though, so will probably checkout typescript or something similar one day.



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

Search: