Hacker News new | ask | show | jobs
by fruchtose 4906 days ago
I agree with a lot of what you said, but I can see one area where I can see what the author is trying to say.

> How is javascript like assembly?

You're right that JavaScript is not like assembly; it's more like bytecode. A number of different languages compile to JavaScript (CoffeeScript, TypeKit, Fay), which is then interpreted. While the intent of JavaScript is that it should be readable by humans, in practice this does not happen thanks to production minification. This is more like bytecode. For example, you can Java .class file with a hex editor, but you'll need software to do that, or a hex editor and a lot of time.

tl;dr: The author means to say that JavaScript is used as a building block for other languages used to write client-side logic.

1 comments

Ok, I can see that point. I guess the big difference is that not many people write in bytecode, but a lot of people (majority in my experience, which might change) write in pure Javascript
> I guess the big difference is that not many people write in bytecode, but a lot of people (majority in my experience, which might change) write in pure Javascript

That's purely a matter of preference. If you want, you can write in Java, C# or C++ and compile that to JavaScript, many major websites use that approach.

The fact that many people still write pure JavaScript shows the opposite of what the article says: People like it and are productive with it. If they were not, they would more often write in something else and compile to it.

Oh, definitely. I write in JavaScript myself. I understand what the author is trying to convey, but both analogies (assembly and bytecode) are wrong in their own ways.