Hacker News new | comments | ask | show | jobs | submit login
Ask HN: Will JavaScript take over the world of programming?
17 points by nawazdhandala on Feb 28, 2017 | hide | past | web | favorite | 25 comments
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?

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.

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.

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


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.

I'm asking. If you say that you don't use the tools, I'll not give your previous opinion too much credit. If you say that you use, and that the recent updates of angular2/4/X didn't messed with your apps, I'd ask more about what have you done. Angular is completely imature, with a huge bad tasty for conventions (If someone says that RxJS is also good software, I'll first ask if they really have used it).

I see no problem in this way of arguing, do you? You have to back up your strong words in favor of something that I, as a user, have a lot of bad things to say about.

You're not answering any of my questions; you completely ignored them which was kind of rude in my opinion. Where are these great Clojurescript projects?

Anyhow, I use Ionic 2 (which is built on Angular 2) with TypeScript build mobile apps and they are absolutely fantastic to work with. What exactly are you going to ask me about this that is going to change your opinion? You've obviously made up your mind. So, what's the point of talking to you? You're not going to argue, you are just going to keep giving out your opinion which, so far, seems highly caustic and ill-informed.

Sorry that next to nobody is using your favorite language. It's not my problem. TypeScript and Angular definitely have a future and no amount of whining is going to stop it.

I also think that is useless to argue as you also have already made your mind. A lot of people would said the same about angular1 and here we are, stuck with an angular2 that breaks your app every release, the last one was angular cli.

I don't update for every single release like you do I guess. So maybe I have not had any problems that you've had. Ionic does not update right away when angular changes either.

My opinion doesn't really matter though. I use what is popular so that I have plenty of help getting my work done. The only opinion that I've given you of Clojurescript so far is that I don't think it's as popular. Other than that, nobody has told me what is so great about it in this thread or anywhere. So I really don't think that you have any basis to say that my mind is made up about how great that is. You're not selling it at all and you didn't even answer my question about it.

You misunderstood my point since the beginning. I never said clojurescript is currently the best option to software development, but it do fixes the architectural problems of JavaScript. As it is javascript, it improves the platform/ecossystem as a whole.

If you wanna a good example: https://github.com/mozilla/mentat

Riiiiight. That's why you made the argument about React/Reagent/Om when I pressed you about that point. Nice try though!

Anyway, I think I pointed out how wrong you are on just about every other point you made in this thread. Anybody who reads this will certainly see that. So, my work is done here :)

Enjoy that last word if you want!

Let me highlight were your desillusion started:

> Clojurescript, for example, makes most of the anti-JS arguments silly, although a lot of people think they look smart bashing JS

Cljs has types (spec), great concurrency and is a very concise language, created by a very smart architect, Rich Rickey.

But ok, you won, man!

My vote goes to Dart

Yes. I have been sucked into the JavaScript vortex.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact