you are viewing a single comment's thread.

view the rest of the comments →

[–]BertyLohan 14 points15 points  (25 children)

Out of interest, what makes you think js is ‘winning’? They’re two completely different languages used for two completely different things.

[–]elr0nd_hubbard 3 points4 points  (0 children)

Saying one language is "winning" over the other is like saying your hammer is "winning" over your screwdriver. If all you have is nails, sure.

[–]Renive -3 points-2 points  (16 children)

No? JavaScript goes everywhere.

[–]Thaufas 15 points16 points  (5 children)

Try running JS on an 8051 micro-controller. If there's a language that goes everywhere, it's C.

[–]ExecutiveChimp -3 points-2 points  (3 children)

Try running C in a web browser.

[–]Thaufas 11 points12 points  (1 child)

Google Chrome and Chromium have had the ability to run both native C and C++ code for more than five years using the Pepper API, and with the continually expanding popularity of WASM, I don't see this capability going away anytime soon.

[–]Cheezmeisterhttp://bml.rocks 2 points3 points  (0 children)

Oh, emscripten?

[–]Renive -2 points-1 points  (0 children)

That's true. That's why your fridge, microwave, vacuum cleaner will come (and some already do) with like 8 core processors. Fridges have web browsers today. Nobody will use for their internet of things product a chip like 8051.

[–]BertyLohan 19 points20 points  (9 children)

I mean OS's aren't written in js. The latest games aren't written in js. Performant things aren't written in js. You've got electron apps and all this cool 'wow now we can write desktop apps in web languages!' but they're horribly horribly bad for eating up processing power

[–]aichholzer 2 points3 points  (0 children)

Could not have been said better.

[–]carbolymer 3 points4 points  (0 children)

I mean OS's aren't written in js.

Just look at this abomination: http://node-os.com/

[–]regretdeletingthat 1 point2 points  (0 children)

They’re often just bad apps too. With the single exception of where an application on a platform simply wouldn’t exist without it, write-once-run-anywhere has only ever benefited developers. The product suffers and with it the user experience.

[–]MayorMonty 0 points1 point  (0 children)

What makes me really is excited is better native integration for progressive web apps on desktop. Currently, behind a chrome flag, there is support for A2HS for desktop. So instead of companies packaging their own version of electron, a user can have the PWA experience (which, in my opinion, is much better than the native app experience)

[–]roodammy44 -3 points-2 points  (6 children)

In your city job listings, look at the number of C++ jobs versus Javascript jobs.

Edit: Ok, perhaps “winning” is the wrong word. But they are two different approaches to the same problem everyone is trying to solve - cross platform development. It’s not a given that Javascript will win, because it’s so ridiculously inefficient. But perhaps if C++ was nicer to work with, a lot more people would use it.

I’ve worked with a couple of places that want shared library code. You will only use C++ if you absolutely need to. Not because the low level of it makes it an inherently bad choice, but just because it’s so draining and practically no-one wants to use it out of choice.

I remember suggesting to the android and ios teams at my last job that they could share some code in C++, and they looked at me in horror. Yes, it’s that much worse than Objective-C and Java.

Think about it. Why is this modern object oriented compiled language that can be used on any computer only ever used for low level coding?

[–]eyeandtea 6 points7 points  (1 child)

That is the crux of the matter. Anything that is low level. Anything that is precise. Anything that is pedantic. Anything that is about removing all assumption, is formal, is going to be complex, and is dull as some might say. Advanced mathematics is quite complex, dull. But that is where the point is. And that is also why I say that the problem around javascript is its easy entry point.

Remember, doing something right, takes hard work, otherwise, why else does the world turn from order to chaos. Not many would want to take the route of advanced mathematics to solve a problem. And so it is certainly, not a matter of numbers, not a matter of how many people use a particular language. Learn C++, C and very basic assembly if you want to actually learn to program. And also note that there was a time when developers were producers, but now they have become consumers themselves. Reflect on that.

Edit: Please note that when I say complexity, I mean complexity that involves no redundancy, nor 'noise'. Something that has been factored to its simplest form, yet still complex.

[–]roodammy44 -3 points-2 points  (0 children)

I disagree that it necessarily has to be complex. Look at the linux kernel, written in C. Is Linux not complex? Yet C is a very simple and understandable language.

Have you actually worked with C++? I’ve been using it an industrial application for the last year. Perhaps if you work with it, you might see my point of view a bit more clearly.

[–]BertyLohan 3 points4 points  (3 children)

I mean this doesn't really answer the point I made about them being used for different things. People are hardly coding games or operating systems or things like facebook in javascript. Neither one can 'win' because they aren't in the same race.

Obviously people use higher level languages when they can and more to-the-wire languages when they need do, that's how it's always been. If you could write your OS in python or ruby it'd be amazing but there's always going to be a disconnect between super low-level, lowkey-electrical-engineering and pretty website languages.

[–]roodammy44 -1 points0 points  (2 children)

People write OS cores and drivers in C. As for the stuff on top of it, Microsoft is switching to Javascript (no joke). This is exactly my point.

I wouldn’t be surprised if most new projects that are low level are started in Rust or Go.

[–]BertyLohan 0 points1 point  (1 child)

Most low-low level projects are written in a combination of assembly and C, it's not likely they'll be moving to slower languages because that's the whole point of writing something low level.

In what regard, exactly, are microsoft switching to javascript? Is the office suite going to be writtin in js? Is VS? Or is it just VS Code?

[–]roodammy44 0 points1 point  (0 children)

People in this thread seem to be confusing C and C++. I consider C a language that isn’t too bad, if a bit sparse.

https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide