Hacker News new | ask | show | jobs
by saagarjha 2291 days ago
> JavaScript is the only thing that you can really run on any semi-modern device.

Wait, hold on: you can usually run C on most devices.

2 comments

Generally true, but we both know that it's not so simple, and I'm surprised HN took this bait so readily.

With JS, you have to worry way less about hardware-specific builds, platform-specific linking implications, differing system behavior and intrinsics, or any of the other substantial hangups that become relevant when you need to distribute a native application across a wide range of devices.

We don't need to repeat the rest of the thread where everyone hops in and says "tut tut, hypothetically, it would be possible for it to not be that way". We're talking about the way things actually are. In an ideal world, JS would've been out of the picture about 3 years after it was born. :)

The difference is that C needs to be compiled to run on anything, javascript does not.
Right, but JavaScript needs a runtime to work at all. And I don't think there was any requirement that the language couldn't be compiled?
It's not like you seriously want to run C without a runtime.
Many people do in fact do this, often for embedded systems. And most other systems happen to ship with a C runtime.
There are C interpreters, commercial and open source since the mid-90's, don't mix languages with implementations.