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

People don't use javascript because it's a beautiful, well thought out language. They use it because it runs everywhere.


Here's the painful part: Douglas Crockford wrote a book called Javascript, the Good Parts.

If Javascript were limited to The Good Parts alone, it has the potential to be a beautiful well thought out language. It would be quite close to a beautiful well thought out language


What's stopping you from only using the "good parts" in your own code? How is JS a bad tool? It runs reasonably fast, works everywhere, is a small, simple language that's surprisingly powerful. What if Eich had been influenced by C instead of Lisp when creating JS?

All things considered, it could have been way worse than it is, and the truth is JavaScript lets you get in there and do good stuff. Not sure why we are still hating on this environment.


I think a lot of experienced developers are only using the good parts, it's difficult to learn but it can indeed be a very beautiful language when you use it with modules/jsLint/jsHint.


On our svn repo (team of 20 js devs) i've added jshint checking in a precommit hook. Devs who don't follow the rules literally cannot commit code. It was much less of a big deal than you would think.


Agreed... I only had to do a couple tweaks to my jshint rules (I prefer comma first, and a few other things)... but it wasn't hard to get used to at all.

Testing is another point... having JS tests can help a lot, though my opinions of TDD aren't as strong as many.


What kind of modules do you mean - there are so many kinds in Javascript?



Yeah, he did. As a javascript developer I wouldn't limit myself that much though - he considers using ++ a sign of bad code.


To be fair, Crockford gives his reasons [1] and the replacement is literally += 1 instead of ++. Given the very low cost of the change, and that it is an optional rule in jslint, I have no problem with it.

[1] See here for more discussion and links to Crockford explaining the reasons: http://stackoverflow.com/questions/971312/why-avoid-incremen...


True, but for me the issue is that with += I have to double check that it is only adding one (and not skipping any) to understand the loop, where as ++ is something I have seen so many times that my brain reads it in a different way.


Did you read the Good Parts? If so, read it again.


I used JS because it was the only option. I'm using it now because it's beautiful and fun.




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

Search: