Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But it's so far from low level, that's the problem. Assembly language represents the raw fundaments of computing, as we have envisioned them. It maps directly to the actual capabilities of the hardware.

If compiling to Assembly is like working with basic molecules, compiling to JavaScript is like working with lincoln logs. And you can build some impressive things with lincoln logs (just like you can build a computer in Minecraft), but you'll always be restricted to things that look like lincoln logs.



I think you're focusing on a different point then the argument. Javascript is often compared to the assembly language of the web because its a) low level web programming and b) its universal; both much like assembly in their own way.

How low level do you need in web programming? Probably not that low, why? Because with web programming it has the potential of being much easier to do something malicious if you have access to the raw hardware like you do in assembly. The whole point of Javascript was to make more interactive sites, and when it comes down to it, Javascript does an awfully good job at being that low level language to do so; It has come to represent the raw fundamentals of web programming as we have envisioned them. So just because its a fully formed language that is much higher level than anything assembly comes close to, doesn't mean that it still isn't 'low level' with in its use case.

Javascript also has the advantage of being universal, much like assembly. Assembly is universal in the sense that different flavors of instruction sets come on different microcontrollers but no matter what, nearly all uc's come with a reference guide which lists out the hex values for each instruction the CPU supports which can be used to build an assembler. These instruction sets all contain a core set of fundamentals such as basic math through the ALU, and storing/reading values and moving the PC and SC around. Which at the end of the day means that all uc's have support for an assembly language in some fashion that shares a common base. The same can be said with Javascript. Every browser comes with its own flavor of the language which supports the common base and then adds some fluff on top, but no matter what, nearly every browser comes with it.

At the end of the day though, trying to compare these is nearly a null-point to me, because they were designed in completely different ages of computing, and are designed for different tasks and are not (not easily at least, although a uc with support for a Javascript vm is possible, and replacing Javascript with assembly is fully possibly, both are rather difficult tasks and as such this argument is, for practical reasons, null also) interchangeable.




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

Search: