4 ms·
What drove you to writing backend code in JavaScript? Having written several projects (client-side, but minimal DOM junk) in JS, I cringe at the thought of havi
by tumult 17y ago
What drove you to writing backend code in JavaScript? Having written several projects (client-side, but minimal DOM junk) in JS, I cringe at the thought of having to use it where it's not required. Some people really seem to like their JS, though, so I'm wondering what drew you to it?
- amix 17y agoThere are two reasons why I picked JavaScript. First, V8+node.js is an amazing runtime system. One should remember that V8 is implemented by a highly skilled Google team that's led by Lars Bak - who was the lead architect for Java's HotSpot VM (the current VM that's used in Java...) So first choice, performance. node.js is also very small in size, so I figured out I could patch if anything wasn't working. The second reason to pick JavaScript is that it's already geared towards event based programming, because of following things: events in browsers and closures are a natural part of the language, e.g. document.addEventListener("click", function()... Event based programming is needed to implement highly scaleable non-blocking servers. So JavaScript is a really good match... And really, JavaScript is a great language and it can emulate almost any paradigm that you may like. node.js also introduces a module system which makes it much easier to manage code. JavaScript isn't perfect and there's tons of bad code written for it, but it's possible to create beautiful code in JavaScript :-)
- tumult 17y agoCool, thanks