No other language is in such a unique situation, so its wise for Electron to be JS centric moving towards the future.
tl;dr: Ubiquity is a feature. Implementation simplicity enables ubiquity by making it easy to port and easy to bring new people on board. Implementation simplicity also frequently results in technical inferiority, but it doesn't matter, because users would rather have substandard software that runs quickly on all devices they target than excellent software that is either slow or unavailable.
The holy grail of web development has always been the ability to write web apps that can run across all popular browsers. I think many have been waiting for JS to be the language it should have been for so long now. Its seems the time has finally arrived and BAM! JS explosion.
JS is not bad at all (JS now that is), its an incredibly flexible language. This obviously annoys many as there are no hard and fast rules for development (framework hell anyone?) but as a language you can apply it to most any environment.
JS is a dynamically typed functional language. Not unlike Scheme or Clojure. It's long history has made the standard library be a mix of programming styles, but I usually make heavy use of Ramda or Lodash and other functional wrappers to get a coherent interface nowadays.
What was a mistake was including `this` keyword though. Never use it, just like you would never do so in Scheme or Clojure. Carthago delenda est.
Come on. It has plenty of unique problems with no upsides. If that's not inferior, I don't know what is.
I meant to say that it has problems which have no upsides. By which I mean that it has certain weaknesses that contribute nothing to its good features and that could have been designed correctly without negatively impacting anything. They are just plain mistakes.
Fun fact:
let list = new Array(5);
list.forEach(() => { console.log("foo"); })
Will display nothing, if you want to properly initialize an array with a defined length, you have to do: let list = Array.apply(null, Array(5)).map(function () {})
I make web games in Typescript, and I get all sorts of problems like this everytime I have to work with 2D arrays, problems that I don't get when I do games in C# with Unity. Unity's modified Javascript actually implements better arrays and recommends not using Javascript's native arrays: http://docs.unity3d.com/ScriptReference/Array.html[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...
for(let v of list) { console.log("foo"); }
If you're saying that "initialize an array with a defined length" should be "initialize an empty array of 5 values of undefined" then yeah, but you can also use:
let list = Array.from(Array(5));
as new Array(5) creates an array of length 5, but each is a "hole"
I know the syntax is similar to C# or other languages, but because it's slightly different doesn't mean it doesn't bring anything to the table. JS or TS != C# in a browser the syntax is similar...
So I think there are very good social reasons why JS "won out." Perhaps it was the weakness of the language itself that made it possible. It didn't seem like a threat in 2008.