Hacker News new | ask | show | jobs
by tomjen3 5278 days ago
I too hate Javascript, but mostly because it is not a language suited to go above a few houndred lines of code -- it is awesome to quickly add some interaction to a website.

That said, Node.js is really well designed. I just wish it was done with some other less dynamic language.

2 comments

JavaScript can easily go over a few hundred lines of code. Sure, you need to be organized about it, and if you aren't you quickly can devolve into a mess of nested callbacks and fragile function calls.

But with a little forethought as you write your code, you can write very complex programs with JavaScript and still have a very readable code-base.

I think that Node.js should have been implemented in a language that supports generators or coroutines as it's a more natural paradigm than callbacks.

I also think that rather than passing in callbacks, functions that do I/O should return Deferreds which allow for more elegant error handling and better flow control.