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

I'm sorry I don't buy JS code is hard to maintain analogy.

If you write modular and/or functional code, JS code bases can be just as easy / hard to maintain as any other language.




No problem. We can all have different opinions, but the good thing is we are all innovative, experimenting developers :).


Perhaps I'm missing something but how is this a matter of opinion? If one wanted to avoid callbacks, which were the OC's original issue with node, one would break up the callback spaghetti into distinct, possibly prototyped objects, and glue them together with node's events. How is that any more difficult to maintain than, say, Python classes? If anything, I personally like the ability to choose the coding style with JS in this case, e.g. callbacks are great for quick prototyping when you can't be bothered to organize everything properly from the get-go.


In a language like Ruby or Python by using Fibers or Co-Routines(Greenlets), one can get benefit of non-blocking IO at the same time avoiding code spaghetti.

Gevent in python for example is pretty popular and similar is the case with Em-synchony in Ruby.

I have used callback objects but really that is not even close to what one can achieve with Fibers or Greenlets.


Can you give an example? Thanks!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: