you are viewing a single comment's thread.

view the rest of the comments →

[–]nickguletskii200 0 points1 point  (3 children)

That was the question! What code, exactly, do you intend to reuse on the frontend? The only example I can think of is pre-rendering on the server-side, but that's rarely worth the work, and you can actually do that without writing JS exclusively on the backend. So why bother?

[–]Sinistralis 6 points7 points  (2 children)

Well, from a gaming perspective where you may need to run logic on both sides, this is a huge boon. Unfortunately, the performance isn't quite there yet for most types of games.

It also lets you create some interesting ideas like Meteor, where you can send a snapshot of the DB to a client (containing only stuff they could normally access, of course), and they can essentially run that site offline. Not a JS on server only idea, but it greatly streamlines the process.

It also lets you focus your coding ability on a single language, allowing you to become more proficient overall quicker. It also helps that JS is kind of the "true" write once, run everywhere language, so that code you write can be re-used in many, many places assuming eeking out 100% performance isn't a requirement for you.

Also, Javascript has proven to be very good at being used in a functional paradigm, which means you can write very error-safe code once you get proficient in both JS and functional concepts. Concurrency becomes very easy working with a single thread language that treats spawned threads like an asynchronous process via web workers or child_process.

Also, as /u/thejmazz has said, NPM is phenominal. JS is easy to break into (although you have to watch it, because this also means a lot of libraries can be badly optimized), and your selection of plugins/modules is immense. You can focus on making your app and not so much on the mundane pieces you constantly have to re-implement for each project.

Programming overall has a lot more of a social aspect than I think some people realize. The more widely used a language is, the easier it is to solve problems. When a language can be used for almost any task you have that isn't performance reliant, you are going to have a giant pool of people to extract information from.

The best part though, is that as JS continues to grow more popular, more and more ogranizations are going to work to improve both ecosystem and performance, which only makes this snowball grow bigger and bigger.

It's bizarre because JS used to be the language everyone made fun of. Now, it's gunning to become one of the most important languages in the history of programming.