5 ms·
It's pointless to be a contrarian on JavaScript. It's here to stay, but it does appear there's a big push to be able to write something other than plain JavaScr
by drubio 10y ago
It's pointless to be a contrarian on JavaScript. It's here to stay, but it does appear there's a big push to be able to write something other than plain JavaScript (that produces JavaScript) to bring more sanity to the development process.
That Microsoft is pushing a superset that produces JavaScript (https://www.typescriptlang.org/ https://www.typescriptlang.org/) and Google is also behind Dart (https://www.dartlang.org/ https://www.dartlang.org/) that produces JavaScript, should say a lot about JavaScript's stickiness.
I actually find it amazing all the effort that has gone into TypeScript and Dart, which just produces more JavaScript, instead of creating a new language from scratch. It really looks like even Microsoft and Google prefer to deal with JavaScript 'as is' going with language supersets and languages that output more JavaScript than launching a new language.
In a few years JavaScript will most likely be the 'bytecode' of the web, you won't have to use directly, but it will just be there, produced by higher level stuff like TypeScript or Dart that produces JavaScript.
- Roboprog 10y agoHope that works for you (GWT sure didn't) I'll be just a wee bit contrarian on this, as I started out in my career using a more or less dynamic language in the mid 80s (despite being schooled in Pascal and later, C, which deserves its own discussion). "Better type-checks interestingly found only just a few bugs" - https://jaxenter.com/angularjs-interview-angular-2-typescript-and-a-release-date-123674.html https://jaxenter.com/angularjs-interview-angular-2-typescrip... I greatly appreciate the brevity of the JS code itself, though I do freely litter my code with JSDoc (or JavaDoc, on the back end) comments. Short code, long comments. Please, WWW entities, DON'T make JS into a Java-like, OOP only, monstrosity. I seldom write real classes in JS. Its amazing what you can do with currying. Supply first few data args - don't need a constructor/setter(s) to configure a "one trick pony" class. Pass in and pre-bind a few function args - don't need an abstract base class. Wrap a function around an existing function - emulates OOP aspect orient programming. I forgot to add, at least one IDE vendor, JetBrains IntelliJ (or Webstorm) does an excellent job of inferring types in Javascript, as is, and much of the autocomplete; find definition / usages; refactor stuff works just fine without jacking up the language.
- eosrei 10y ago> In a few years JavaScript will most likely be the 'bytecode' of the web All major browsers are working on WebAssembly as a bytecode for the web: https://webassembly.github.io/ https://webassembly.github.io/ I expect we will skip JavaScript for TypeScript/Dart -> WebAssembly in the future.