3 ms·
I wonder how much of the hate for newer and easier approaches stems from the fact that people made an investment by learning a more complicated technology and a
by Riesling 13y ago
I wonder how much of the hate for newer and easier approaches stems from the fact that people made an investment by learning a more complicated technology and are now trying to protect this investment by ridiculing the new approach.
- calinet6 13y agoMy problem is that it's not really a newer and easier approach, it's a newer and slightly different approach. Javascript was a perfectly good language to begin with, Coffeescript just made it shorter and with a bit different syntax here and there and with a feature or two for handling closures better. Not bad, surely, but not really that great either. My experience working in Coffeescript so far has been that it's still important to understand the javascript it's going to be translated into, to understand the subtleties of closures and scope as they're implemented in coffeescript. Why, then, use coffeescript? It's so much clearer for me to simply see that an anonymous function is being defined to pass this scope and do this yada yada, and while longer, I much prefer that over a language that hides the true meaning in an attempt to reach some sort of syntax simplicity that doesn't really have that big an effect in the end. It's not a protection of an investment, it's that I can't imagine ever being able to use or understand Coffeescript without also having an expert grasp on Javascript. I don't know of anyone who knows Coffeescript on its own. You still need to understand what it's doing, fundamentally; or at least, it's useful to; or failing that, it's right to understand it. I don't know if I want a developer who knows only Coffeescript. I don't want someone who doesn't understand what it's being compiled into. Frankly, the same goes for other languages: you really should understand what assembly fundamentally does, and how your IF statements and loops are translated. It makes a ton of sense that we don't write our code in ASM these days, but for Javascript it just seems lazy. Javascript is a perfectly serviceable extremely high-level language. It's not that hard to learn or to work in, and if you know it well, it's actually quite nice and has many interesting features. Coffeescript, as a rejection of Javascript, makes little sense to me because Javascript just isn't that bad. However, Coffeescript as a response to wanting another language on the web; wanting a slightly clearer syntax for writing asynchronous callbacks and classes and whatnot—sure, that makes some sense. It just still feels dirty. At its most basic level it just feels like a lazy hack, because it's layered on top of this other perfectly useful high-level language that might be 50% more lines of code, but would work perfectly fine. What it really means is that the browser is the new CPU and Javascript is the new machine code. It's just another layer of abstraction. In the end, I don't like it because Javascript is just not that hard. I imagine this is echoing the arguments of C die-hards upon the advent of newer, higher-level languages. It all makes sense, but sometimes it's hard to swallow.
- npsimons 13y agoMy problem is that it's not really a newer and easier approach, it's a newer and slightly different approach. Very much this: to those who would say, "oh, you're just invested in the old technology" I would say yes, I am; but I also posit that you are overblowing minor differences in a newer approach merely because it is newer. Even if it is significantly different, that doesn't make it better; not all change is progress. When I see something that gives me a significant advantage, whether it's old or new, I'll take it. But I'm also very discerning in what I invest my limited time and brainpower in, and throwing away previous experience, sunk though that cost may be, is foolish without good reason.
- beat 13y agoAs a former C programmer who truly loves C... I wouldn't use it DIRECTLY for anything except things that couldn't be done in any other language, things where you really need that fine-grained memory control for performance or deeper technical issues. By all means, wrap code in more abstract languages! I feel the same about Coffeescript. A while back, I spent a couple of months as a full-time Javascript coder. I like a lot of things about JS, but the line-noiseish syntax (especially around callbacks and anonymous function declaration) was damned annoying. Compared to its elegant-syntax contemporaries like Ruby and Python, it felt awkward. Coffeescript is a hack, yes, but it's a nice one. It plagiarizes some of the best syntax ideas from more graceful languages (list comprehensions, splats, whitespace significance, etc), and adds them to the good ideas and functionality of JS. I agree that in order to write good Coffeescript, you should be able to write good Javascript too, in order to see the gotchas. But that doesn't mean a preprocessor is a bad thing, not if it gives this much readability and functionality. Sadly, I think there's a bit of machismo involved in the sneering at Coffeescript, not a real technical issue.