3 ms·
So this is a kind of teenage hubris thing ? In which other field this would be normal ? I play the devil's advocate there, but please bear with me : IMHO, this
by LBarret 12y ago
So this is a kind of teenage hubris thing ? In which other field this would be normal ?
I play the devil's advocate there, but please bear with me : IMHO, this attitude is among the causes of the high failure rates of many projects (personnal or pro).
The constraints are minor, the gains of coffeescript quite clear. There is no important gains in sight that justify moving to js. So why changing ?
Changing for the sake of change, is silly and something all of us do. A successful project needs as much technical stability as feature stability.
- ceronman 12y agoIt depends a lot on the context. Richard Stallman defines hacking as "playfully doing something difficult, whether useful or not". In the context of hacking, change for the sake of change is perfectly fine. You don't always have to move forward and get things done. Leave that for the corporate world where your goal is to make money. Many of us have learnt a lot just by switching programming languages many times and rewriting stuff. We're not losing time, we're learning in the process, and most importantly, we enjoy it, because that's what hacking is about.
- LBarret 12y agoFor many projects of playful hacking, you want to reach a goal. If the goal is learning the language itself, it's allright and we are in agreement. But more often, you want to build an app, a toy and changing language midway is a shortcut to failure and disappointment.
- weego 12y agothe gains of coffeescript quite clear As someone who has been writing JavaScript for 15 years and has never felt like writing it is a struggle I would ask... are they? I don't know what it solves. Writing a language designed to be written by hand in another language and then transpiled to the first language you have to know in the first place to be any good at it has always seemed like a horrible non-solution. You don't know what you've actually written at that point.
- LBarret 12y agoFor you, it has no advantage. You have integrated all js by now and you avoid the common mistakes instintively. For me, it is the gray area, I am a language geek so the semantics of js are quite clear but js bytes me sometimes. In coffeescript, The syntax is better and the semantics are better exposed , so it may be a net win. For a guy who is already familiar with coffeescript, the change will be likely negative. Familiarity with coffeescript is likely to generate bugs in javascript. You're moving from one language to another after all. The impact won't be huge as the two are quite close, but there is no reason to change in the first place.
- gabemart 12y agoCan you give a few examples of common JS mistakes that coffeescipt prevents?
- dscrd 12y agoI'm not deep in either CS or JS, but I suppose one could find some pitfalls from the differences between == and ===, and from checking the existence of a variable? Also, JS switch/case statements follow the good-old maldesign from C where each body has to end with break or it falls through. Variable hoisting? This: http://dorey.github.io/JavaScript-Equality-Table/ http://dorey.github.io/JavaScript-Equality-Table/
- mmatants 12y agoI feel a lot of folks are not mentioning a huge thing CoffeeScript is valuable for - its list comprehensions and proper for-each. JS has them too as part of ES5 spec, but CS still is an elegant solution. It creates a whole new way to speak code, like in Ruby, Python and others. Syntax, variable niceties are great too, of course, but do not define CS alone.
- deleted 12y ago[deleted]
- danabramov 12y ago>There is no important gains in sight that justify moving to js. Getting rid of a dubious build step that doesn't get any real advantage in this project, but makes it slightly more obscure for people unfamiliar with CoffeeScript (and a lot of new developers don't bother to learn it now that ES6 is quite tolerable)?
- practicalpants 12y ago> this attitude is among the causes of the high failure rates of many projects It's a battle of philosophies. I value efficiency and just getting things built, so I love CoffeeScript. It's a breeze to read and write. OP wants control and customization, more 'freedom.' If I was working on a team with OP and he instituted this, I would quit on the spot.