Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As much as I don't like the analogy of JavaScript as the assembly for the web, this feels like a fully general argument against learning any language besides Blub, where Blub is some 'base'.

"C means giving up on x86 assembly."

"If we're already willing to learn both languages and then spend time reading and debugging assembly code, why not just write good assembly code from the start? For the extra effort you'll make learning C and its and its compiler's idiosyncrasies, why not put it towards really learning assembly?"

I'll tell you why. Because while the initial cost of learning CoffeeScript (or my own preference, ClojureScript) may be high, once that barrier is passed the benefits of those languages mean at minimum that you're writing more-likely-to-be-correct code faster. A master C programmer beats a master assembly programmer.

One nice thing about ClojureScript is it lets you hook up a REPL with a browser window which is great for many debugging needs, you can't do that in JS without something like Firebug (which has its own quirks). The interesting note there is that ClojureScript, and I imagine CoffeeScript, are marching steadily toward the place where you don't need to know JS anymore, and learning it is something you only do if you want to.

At one point you did need to know at least some assembly to really do C, especially because you'd have to help the compiler out when it generated stupid code. That age is long gone (except in the microcontroller world but Arduino is making headway on that), many programmers learn C and never learn any assembly. (Not to mention the matter of which assembly.) You might have to learn a bit about computers like the concept of memory and pointers to do C, but those aren't fundamentally assembly features, just like needing to learn about the DOM and browser events in ClojureScript/CoffeeScript isn't a fundamental JavaScript feature. (As anyone who has done anything with RhinoJS knows.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: