News for hackers. Stuff that matters.
Re:JavaScript is Not Web Assembly by Cushman on Sunday March 31, 2013 @02:01PM (#5469494)
I agree with the first part, disagree with the second. "JavaScript is assembly" is, in my estimation, usually a rather blase metaphor for the idea of JavaScript as a compile target. People don't say "JavaScript is the new C" because generally you don't target C. (Generally you don't target assembly, either, but the distinction between assembly and machine code is academic to most people.)

And it's no surprise that we're getting lost in this; making arguments based on metaphors rather than the thing itself is a classic trap. We should make an effort where possible to talk about what JavaScript is rather than what it "is".

Re:JavaScript is Not Web Assembly by scott_s on Sunday March 31, 2013 @02:35PM (#5469630)
I guess it depends on how general you mean "generally" to be, but there is a history of people targeting C for new and experimental languages. It's a convenient target because we have a good idea of what kind of assembly will be created for a given chunk of C, and you can get architecture independence for free.
Re:JavaScript is Not Web Assembly by Cushman on Sunday March 31, 2013 @04:07PM (#5470009)
> and you can get architecture independence for free

And you target JavaScript for precisely the same reason :) Perhaps the better way to say it is this: C is a language which was once written by hand, but which is increasingly being used as a target for higher-level languages. The same thing is happening to JS, but at least to me "JavaScript is the new C" is not a particularly useful way to express that similarity.

Re:JavaScript is Not Web Assembly by vidarh on Sunday March 31, 2013 @03:23PM (#5469842)
> because generally you don't target C. (Generally you don't target assembly, either, but the distinction between assembly and machine code is academic to most people.)

You're excluding a large chunk of compilers with those two generalizations. Targeting assembly rather than directly emitting machine code is extremely common (gcc being one of the obvious examples), and targeting C is very common for new/experimental languages.

Re:JavaScript is Not Web Assembly by Cushman on Sunday March 31, 2013 @04:14PM (#5470029)
All I'm trying to say is that "a target for higher-level languages" is not a defining attribute of C in a way that makes "JavaScript is the new C" a helpful analogy.
Re:JavaScript is Not Web Assembly by fauigerzigerk on Monday April 01, 2013 @04:55AM (#5472083)
"making arguments based on metaphors rather than the thing itself is a classic trap"

Well, yes and no. I do agree that it often goes completely wrong and can be very misleading. But the JavaScript/assembly argument is more an analogy than it is a metaphor, and analogies are a very important function of intelligence and a tool for making important discoveries.

That said, I like your generalization "compile target" a lot more than calling JavaScript assembly.

Re:JavaScript is Not Web Assembly by epsylon on Monday April 01, 2013 @05:12AM (#5472115)
There are a lot of compilers that target directly C.