Hacker News new | ask | show | jobs
Ask HN: Will JavaScript take over the world of programming?
17 points by nawazdhandala 3397 days ago
I'm Nawaz and I work with CloudBoost.io We have SDK's for JS, Android, iOS and more. We see more than 82% of our API consumption is with the JS SDK, 11% on Android and 6.8% on iOS and less than 0.2% on REST.

JS can now be used on the server (with Node), on mobile (with ReactNative / Ionic / etc), on the embedded (with CylonJS). Do you think there will be one language in the future which will make lives of dev's a lot easier?

12 comments

Even with improvements, there are often much better options than JavaScript. If you aren't going web or had a limited talent pool/codebase to economize in a mobile app or server (React Native/Node), why would you choose JS? Why not C# (windows, games) or a nice functional language (Wall Street) or Python (ML)? In fact, from all I've experienced so far (as a researcher at MSR and now at HARC), it seems like JavaScript is either the only option, or not an option at all. The choice is pretty clear, especially as you move away from web and web-like mobile applications where JavaScript otherwise dominates or at least is viable.

There will never be one language, and honestly, learning languages is never really the bottleneck anyways (rather learning the domain and applicable libraries are). A single language to rule them all might boost industry productivity by .1 or .2%, maybe, but I doubt it.

Short intro about me: I've been developing systems mainly in Javascript, PHP (I am ZCE and I dropped PHP 6 years ago), Java (OCMJD), and Python for the last 13 years, and for a few projects I have used TypeScript, Dart, C, and C++. A bit of Ruby.

That's an absolute fantasy that JavaScript will be the one language that will be used as a single option in the future.

Not even taking into account that often languages and frameworks are chosen on the basis of the problem you are solving (and you just happen to work in the field where JS is more popular/viable choice) - it is extremely poorly designed language (and probably only PHP is worse at this) and I always question the sanity of the people that choose to use it on server-side (but there are good reasons to use it there - they are just rare).

JavaScript is plagued with problems like: - No static typing support by default - Before ES6 the class support was a mess - No Standard Library! - NPM and the whole dependency system is hell

There is a reason why people keep writing languages like Dart, Elm, CoffeeScript, and TypeScript.

TypeScript and Dart deserve some special attention - the problems with JS were (and still are) so big and annoying that big companies like Google and Microsoft spend thousands of man-hours developing things like Static-typing support, Standard Libraries, and, most importantly, tooling.

And we haven't yet scratched the "real enterprise systems" where transactionally support is a must. JavaScript has yet to go through so much shit to develop frameworks like JMS, Hibernate, and Spring that enable you to do all the fancy transactional stuff just with annotations. However, I do not see anybody developing something like JavaScriptSpring because JS fundamentals are broken and nobody will build big software in such a language because it is just not feasible.

I guess that's enough for now - it's already too ranty.

It already has.

And you forgot on your list that JS makes your SmartTV, STB, Xbox, PS, Wii, and many more platforms work. An example, Netflix for all those platforms is made with JS. You've also got react native and Cordova for mobile.

The future is either JS or very specific systems languages (C/C++/Rust).

To a large extent it already has, although there are a lot of people fighting a rear-guard effort against it (myself included).

Web assembly may level the playing fields for other languages eventually but it will probably be too late, so javascript will continue to be the native imperative browser language and, in as much as developers care about "one imperative language everywhere" it will be the most obvious option.

My effort (intercooler.js) is to use HTML as the main client side language: it's native and declarative, and lets you take advantage of REST/HATEOAS naturally in a way javascript SPA frameworks don't. By minimizing client side javascript, and since you are always going to be dealing with HTML anyway on the web, you can pick whatever backend technology you like (I like rails) without adding in a new language to the cognitive load of your app.

Languages all have strengths and weaknesses, I don't see why I would suddenly throw that away and only use JS.
It already has, but it is at or near its peak. Javascript is a decent language, but the primary reason it is used everywhere is because, at the end of the day, it's the only language browsers support. WebAssembly will soon change that.
Cobol will. /s
No.
It will/has, but not in the vanilla flavour. Clojurescript, for example, makes most of the anti-JS arguments silly, although a lot of people think they look smart bashing JS. C# is better than JavaScript? No f way. C# isn't even better than Java, which a lot of high profile developers disgust more than JS.
C# is certainly better than JavaScript in many ways. That's why tons of JavaScript developers and popular projects have now switched to TypeScript, the C# of the web.

Meanwhile...next to nobody uses Clojurescript.

> That's why tons of JavaScript developers and popular projects have now switched to TypeScript, the C# of the web.

Give me ONE great example. Angular/2/4 is crappy and can't stand against React, much less Reagent/Om (cljs).

Did you already use typescript? Because that is a really shit tech. Thanks god I don't have to use Enterprise bullshitness to sell software.

Well, I don't know where you get the idea that C#/TypeScript/Java/etc are only used in bullshit enterprise projects but you couldn't be more wrong about that. There are plenty of games, mobile apps, hobby projects and other fun things written with these. Take a look around. Twitch.tv has a number of Windows/C#/TypeScript devs that work on games.

Anyway, have you heard of VSCode at all? That's written in TypeScript. So is Ionic 2 and Ionic Native. Those along with Angular 2/4 are all complete platforms written in TypeScript...

So, what have you got besides Reagent/Om? Because those aren't even half as large, popular or even alive as the ones I've mentioned (and React isn't built with Clojure either).

Do you use angular2 with typescript? How would you describe your experience for you in the last weeks/months and releases? Do you use angular-cli?

The only thing I'm going saying is that it is reaching the 4.0 version with the stability and concisiness of a 0.3 alpha.

Are you asking me or are you telling me? I feel like no matter what I say, you are just going to shoot it down anyway because it seems like this particular avenue of thought is completely closed off to you. What do you think I'm going to say? That I don't use them? Not sure what kind of response you are expecting here.
My vote goes to Dart
Yes. I have been sucked into the JavaScript vortex.
I hope that with the advent of WebAssembly, Javascript can be thrown in the dustbin of history. Isomorphism, with a better language to do it in, sounds like a lot of fun.

Some days, I like to imagine a world where browsers had Python embedded as their scripting language.

For this Brython is often close enough.