6 ms·
On the one hand I get why people are excited about this and why people like coffeescript, especially when source maps start working in inspector/firebug. You c
by eagsalazar 14y ago
On the one hand I get why people are excited about this and why people like coffeescript, especially when source maps start working in inspector/firebug. You can write web apps in the language you love and know. Cool!
On the other hand, this really sucks. Javascript is just maturing to where it is really awesome! And there is a ton of collaboration among app developers because javascript was the only game in town for so long.
Of course people will continue to collaborate but not, I fear, at the same level. 3rd party libraries will continue to be available, but not as many will fit in so neatly with people coding in other languages.
This has already come up a few times with coffeescript and in a couple years when it is truly easy for people to work in other languages, we'll have a tower of babel effect.
JS is really good. It isn't that hard to learn if you already know other languages. It has warts but it is also very powerful so often it is worth it (check out the lines of code and speed vs other languages):
http://shootout.alioth.debian.org/u32/javascript.php http://shootout.alioth.debian.org/u32/javascript.php
- chii 14y agoI think that NaCl is more geared towards being a target of a port for an existing application thats been written (like the supreme commander game that google managed to coerce a studio to port to NaCl). I htink the pie is big enough for both NaCl and javascript apps.
- azakai 14y ago> I think that NaCl is more geared towards being a target of a port for an existing application thats been written It is, but you can also port existing applications to JS. > I htink the pie is big enough for both NaCl and javascript apps. It's a different pie. NaCl is chrome-only (and just enabled in the chrome store, in fact), while JS runs in all browsers.
- Drakim 14y ago> It is, but you can also port existing applications to JS. You can't just port things to JavaScript the same way. JavaScript is a very different sort of language. "porting" something to JavaScript pretty much always means remaking the whole thing from ground up and hoping that your pixel pushing in canvas runs at an acceptable speed.
- obtu 14y agoActually Emscripten allows you to port an existing native application to JS, and the development effort is comparable to using NaCl.
- TazeTSchnitzel 14y agoYup. They've ported all sorts of things with Emscripten, including, I believe, Ruby, Python and Perl.
- batista 14y agoYes. But it's a POC thing that's also some orders of magnitude slower...
- azakai 14y agoIt's not orders of magnitude slower, most benchmarks have it 2x-6x slower. It's rarely slower than 10x (one order of magnitude). And that is before JS engines even start to optimize for it.
- bzbarsky 14y agoYou might want to read http://mozakai.blogspot.com/2012/05/emscripten-opengl-webgl-conversion.html http://mozakai.blogspot.com/2012/05/emscripten-opengl-webgl-... for some eye-opening about what one can do with porting to JS in a _modern_ browser.
- bad_user 14y agoYou're right about Javascript, but those benchmarks you link to are completely useless. Take a look sometimes at the actual code.
- igouy 14y agoYour complaint is "completely useless" - say specifically what you think is wrong and point to examples. If you think you could write better programs then write better programs and contribute them.
- lucian1900 14y agoJS is not really good, sadly. Harmony is looking better all the time, but still nowhere near as sane as most other dynamic languages.
- tomjen3 14y agoHow much JS have you actually written? It is a crap language designed in an afternoon and nowhere near good enough to solve the problems we currently use it for. Just a few things of my head: 'this', 'var', no integers, semicolons, no block scope.
- larholm 14y agoI have written a lot of JS since my humble beginnings in 1997 where I wrote an "ajax" chat system running down to Netscape 2 and IE3. There's no point in dismissing JS due to simple lexical issues; those have in no way prevented us from maturing the language use through idioms, patterns, tools and collective knowledge. JS is more than good enough as a basis for CoffeeScript and Emscripten - so why should we care whether scope context or a lack of block scope can be initially confusing?
- batista 14y ago"var" and "no block scope" are horrible. "No integers" is bad. "this" can swing either ways. It provides some cool possibilities. "semicolons" however (either the presence or the removal of) is a totally inconsequential and trivial syntactic thing. Removing semicolons doesn't even buy you what a small amount of syntactic sugar buys you. You saved a few keystrokes. Big fucking deal.
- VeejayRampay 14y agoI'ver never understood how the "this" thing actually brings possibilities. If anything, it introduces unnecessary confusion about scoping/binding. Python and Ruby don't have "this" and do just fine.
- batista 14y agoWell, Python has "self", that you have to explicitly pass. Not the best example.
- lucian1900 14y ago