News for hackers. Stuff that matters.
Re:JavaScript is Not Web Assembly by simonsarris on Sunday March 31, 2013 @01:34PM (#5469388)
I fear that this is one of those "I've heard someone make a metaphor and taken it too literally, then rebutted that literalism broadly."

I imagine 99% of the time that metaphor is made the author would be just as happy saying "JS is the new C", it simply doesn't roll off the tongue as well.

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.
Re:JavaScript is Not Web Assembly by fkdjs on Sunday March 31, 2013 @03:19PM (#5469828)
You really shouldn't try to use metaphors when making an argument. Someone says A is like B, another person disagrees that A is like C. But no, says another, A is like D. Finally, an internet troll points out A is like B and D, but definitely not like C. By then, everyone's brain gives up trying to figure it all out.

If you're gonna make a point, make a point, it's that simple.

Re:JavaScript is Not Web Assembly by biot on Sunday March 31, 2013 @05:36PM (#5470276)
Are you arguing that metaphors have no value when explaining a concept? I'm sure Shakespeare would be a whole lot more boring without the use of metaphor:

  To be, or not to be: one could ponder:
  Whether one's sense of self-worth increases
  In direct proportion to one's ability to accept adversity,
  Or to address challenges,
  And in so doing solve said challenges?
Personally, I prefer the original:

  To be, or not to be: that is the question:
  Whether 'tis nobler in the mind to suffer
  The slings and arrows of outrageous fortune,
  Or to take arms against a sea of troubles,
  And by opposing end them?
[Apologies in advance for the inevitably botched translation.]
Re:JavaScript is Not Web Assembly by andrewflnr on Monday April 01, 2013 @12:15AM (#5471399)
Explaining a concept to a friendly listener is an entirely different challenge than convincing even an honest skeptic of something. Metaphors are good for the former, dangerous at best for the latter (but beware the continuum between them).

And of course entertainment is yet another game. Any sort of serious argument in a work of entertainment is probably trying to fly under the radar of skepticism anyway... Dang it. Point is, fiction is not usually a good model for rational discussion.

Re:JavaScript is Not Web Assembly by pekk on Sunday March 31, 2013 @06:29PM (#5470422)
Shakespeare was not arguing about programming languages, though.
Re:JavaScript is Not Web Assembly by biot on Sunday March 31, 2013 @06:44PM (#5470476)
The comment I replied to said "You really shouldn't try to use metaphors when making an argument." Was Shakespeare not using his characters to present an argument for dramatic effect?
Re:JavaScript is Not Web Assembly by fkdjs on Sunday March 31, 2013 @09:06PM (#5470904)
Shakespeare is entertaining and metaphors are fun. Do you disagree with a poem and bring up logical fallacies? Of course not, we read them for entertainment value and anything we learn is a bonus. That is separate from metaphors used when trying to discuss the nuances of an argument within the confines of trying to have a logical argument. Poems and Shakespeare aren't supposed to be logical all the time, that would be boring.
Re:JavaScript is Not Web Assembly by biot on Monday April 01, 2013 @03:29AM (#5471919)
Which logical argument are you referring to? Scott Hanselman used an analogy to make an observation about javascript. It's a blog post, not a rigorous mathematical thesis. Who are you to say what rhetorical devices someone should or should not use?
Re:JavaScript is Not Web Assembly by amirouche on Sunday March 31, 2013 @02:48PM (#5469694)
This can help https://news.ycombinator.com/item?id=4630057 «JS is the web's “virtual machine”» Brendan Eich
Re:JavaScript is Not Web Assembly by spinlock on Monday April 01, 2013 @12:33PM (#5474099)
Glad to see this is the top comment. Makes me believe hackernews is still a smart place.
Re:JavaScript is Not Web Assembly by Helianthus on Sunday March 31, 2013 @01:52PM (#5469451)
It's not, in fact; it's a good extension and modification of the metaphor.

Not that the original metaphor is wrong or useless; but thinking of javascript as C provides some glimpse into the risks of what made C++ problematic.

The author picks Coffeescript as an example of a fairly sensible approach to the problem, but "the language-wank crazy" are taking a lot of risky approaches.