Hacker News new | ask | show | jobs
by Pr3fix 3445 days ago
Bingo. Having one language for your front end, back end, build tools, database schema... It simplifies life a lot.

You can reuse code / modules.

You Don't suffer from context switching inherent with jumping between languages.

Also, people act like JavaScript is a bad language purely because it is not strictly typed. It's an incredibly fast and robust language with a vibrant ecosystem -- something I'd argue is more important than pure technical bullet points.

4 comments

> It's an incredibly fast and robust language with a vibrant ecosystem

You will find support for the most random and amazing things in JS. It is truly mindblowing.

I recently had a client request to run a process involving extracting data from an Excel file. Originally wrote it in python using openpyxl http://openpyxl.readthedocs.io/en/default/, then it turned out the client also needed XLSB support. openpyxl and xlrd don't support XLSB, but the only thing that did work was a JS library http://oss.sheetjs.com/js-xlsx/ and node module

Yes, it's pretty much bananas. There is SO MUCH work being put into the ecosystem, that there really isn't much you can't do at this point. There is a node module for EVERYTHING. For all of JS's warts, it's fantastic to deal with.
For those that want to get more strict typing there are two great options in Typescript and Flow.
I like the dynamic + functional aspects of JS. I just wish that Node JS semantics were more like Erlang (which I have only admired from afar, alas - Java brain death forever!).

E.g. - concurrent operations in a single VM, but using actors exchanging immutable messages, NOT shared data and locks.

> Having one language for your front end, back end, build tools, database schema... It simplifies life a lot

If only it were a better one.

Maybe something that was designed from the beginning to be a general-purpose programming language, and not a hacked-together-in-a-weekend scripting language intended to add low-grade interactivity to HTML, that has bloated and twisted into the mess it has become.

I'm eagerly awaiting the advent of the WebAssembly era, and honest-to-goodness real compilers. Flying Spaghetti Monster be praised, then we may be able to leave some of this nonsense behind.