3 ms·
> JavaScript is not the Assembly of the Web. It’s the C of the web. The to-JS languages are lining up to become the C++ of the web. that's just uninformed. bot
by ibotty 14y ago
> JavaScript is not the Assembly of the Web. It’s the C of the web. The to-JS languages are lining up to become the C++ of the web.
that's just uninformed. both analogies are wrong. but yours is even more so.
c++ is usually compiled down to assembly w/o going through c (there have been a few but it has not been mainstream for _many_years). so coffeescript or any other to-js language is _not_ the c++ of the web! the author implies, that (say) coffeescript is to js as c++ is to c.
but before (s)he gives two reasons about c over assembly.
1. assembly is variable, c is a constant,
2. c is way more expressive.
there is some truth in the first on, that one does not hold for js. whether it really holds for assembly is debatable given how much porting is involved for arm devices. and if you think about asm.js you might think that's a different assembly (js to asm.js is like asm to simd instructions maybe?).
the second point might not hold for coffeescript, but look at closure, fay or elm. they are very distinct from javascript.
- xd 14y ago"there is some truth in the first on" What do you mean "some truth" .. different CPU architectures have different assembly language .. what's to get? Oh, and SIMD instructions are an extension to the x86 instruction set .. not an abstraction. What is your background on low level development, may I ask?
- ibotty 14y agomaybe i did not make myself very clear. i tried to address the analogy which is implied by these two points. and it is true, that for coffeescript on javascript, coffeescript is not more constant and js is not more variable. but that's not the point of the argument javascript were the assembly of the web. the point is, that all these languages compile down to js. as c and c++ compile down to assembly. and honestly the "c is constant" is not right some of the time either. consider small/big endianness, different libcs. heck, even the syntax changed (k&r surely looks and feels different). my comment on simd instructions to assembly was an analogy to asm.js and javascript.
- munificent 14y ago> The to-JS languages are lining up to become the C++ of the web. What I find funny about this remark was that I think it was intended to be disparaging because the meme these days is that C++ sucks. But C++ is actually wildly successful and is the bastion of many very large, complex, fast, applications that would be very challenging to write in vanilla. Yes, you can stick to just C, but many many programmers have profitably switched to C++ instead. Almost the entire game industry, most desktop applications that people use for their jobs, web browsers and even JavaScript engines themselves are all written in C++. If the new crop of compile-to-JS languages are in a similar boat, then sign me up!