by asaarinen · 13y ago · 0 comments
Computing will need to move fluently between the cloud and the terminal, and JavaScript is the only language which allows you to use a single codebase for both (in the foreseeable future). As developer time will stay the biggest expense when developing software, I am bullish on Node and JavaScript.
Because Node does not strictly equal Javascript-- V8 is not Javascript, nor is spider monkey. Most node applications, without some modification, do not run in the browser. They are missing tons of libraries and cannot interact with the file system.
I do appreciate the ability to have a single codebase, but over the past few years, I've pivoted and hope to someone's god that it is NOT javascript. Mostly because, in my experience, Javascript itself, even with a great focus from the beginning, is incredibly difficult to maintain.
Even then, is having a codebase in one language the best idea? There are some things that are much better to write in Erlang than they are C, and vice versa. It depends on the problem you're trying to solve.
The bigger the project, the less Javascript I want in it.
I think ASM.js, or something similar, will be the death of writing Javascript. Then it won't matter what language it's written in, we can use source maps to debug and it'll be faster than we could've ever written by hand*
*single one off functions don't count. Try writing a webapp in pure x-86 assembly.
[1]: ocsigen.org/js_of_ocaml/
The argument for developer time--as well as decreased maintenance cost--is exactly why I went with OCaml over pure JavaScript. And so far it's certainly paid off!
Besides, the ability to compile to JS is not enough; you will need to read it in JS, debug it in JS and let other developers work on it in JS (because they don't know OCaml).