Live data from Hacker News

Why CoffeeScript Isn't the Answer

walkercoderanger.com

31–40 of 148 posts

Re: Why CoffeeScript Isn't the Answer

#31
post #7

Earlier quoted context omitted.

He covers that here: http://www.walkercoderanger.com/blog/2014/02/javascript-mine...

Ironically - he doesn't it's kind of the whole flaw in the series. How is JavaScript a minefield? Well, JavaScript has all sorts of pitfalls lurking for the developer. Each pitfall is like a mine in the minefield, silently waiting for you to accidentally step on it. Just like the minefield, JavaScript’s mines are hidden in plain sight. Entire books have been written about all the mines present in JavaScript. Maybe I’…

A little further down the same post [1]:

Given that a safe path through the JavaScript minefield isn’t enough, it seems like we need a detailed map of the minefield. Many books and blogs have been written to provide that map. JavaScript: The Definitive Guide by David Flanagan is one of the most detailed of those books. The JavaScript Garden is a good place to start learning about the mines online. [2]

[1] http://www.walkercoderanger.com/blog/2014/02/javascript-mine...

[2] http://bonsaiden.github.io/JavaScript-Garden/

Re: Why CoffeeScript Isn't the Answer

#32

Sometimes I think that most CoffeeScript, ClojureScript, etc. programmers are people who were advanced in other languages before they learned JavaScript. There are quite a few programmers who have no issues with these "bad parts" or "really bad parts" because they cut their teeth on them, and these numbers are growing: Most people now learn JavaScript as their first language. JavaScript already won, and things like C…

as someone who coded JS all through the 00 years and still remember the times when we welcomed prototype.js as fresh air and the struggle that was JS coding then - so basically i think i'm the ancient regime - i have to say: no

CS is not the silver bullet - but neither is blind believe that vanilla JS is the best way to code for the web. things change. technology runs in (hype)circles: we welcome the new stuff (i.e. languages), only we see the benefits of the old way, and then we still create new stuff...

Re: Why CoffeeScript Isn't the Answer

#36

Ok, so if CoffeeScript is just JavaScript, add the parenthesis. If you need brackets to make a section of code readable or compile to "certain" JavaScript, then add them. Even the programs I work on we add parenthesis, brackets, etc for readability. Use CoffeeScript to increase productivity. Nowhere does CoffeeScript say you must use white space instead of brackets and such. Keep it simple and easy, classes are also…

There are still two sides in programming, it seems. And interestingly enough it's not necessarily static vs. dynamic or procedural vs functional.

One the one hand you have pragmatic, loosey goosey languages like perl, javascript, ruby, even scala and C#. An important defining characteristic being perl's maxim "there's more than one way to do it".

On the other hand you have what I'd call the "bondage and discipline" languages like python and java. The defining characteristic being "there should only ever be one right way to do a thing".

In my experience people coming from the 2nd world have a harder time living in the 1st than vice versa.

Re: Why CoffeeScript Isn't the Answer

#37
Am I the only one astounded that we're still having this conversation? The fact that it's still around shows me it has indeed been "the answer" for some. The fact that it hasn't become ubiquitous is plenty of proof that it also is not a one size fit all solution, as if any solution is.

Re: Why CoffeeScript Isn't the Answer

#38
There is still not "answer", and the world is not gonna end tomorrow, in the future maybe will be one but until that day comes i will stick with whatever i find appealing to me at present. For now is CS.

Re: Why CoffeeScript Isn't the Answer

#39
I do have some frustrations with CoffeeScript as outlined here - I find the unless keyword infuriating because it forces me to read backwards:

    a = 123 unless b == 2
"OK, so a is set to 123. Oh, unless b is 2. That's annoying"

That said, my answer is to just not use the unless keyword. If you don't like CoffeeScript classes, you don't have to use them. IMO you could write CoffeeScript using only the kind of functionality availabie in vanilla JS and it would still be a preferable experience.

Re: Why CoffeeScript Isn't the Answer

#40
> The declaration of what food is occurs in the middle of the line and doesn’t even look like a variable declaration.

And that's what makes the whole line unreadable. And 'unless' would make it even less readable.

I can understand why people insist on discussing such personal, subjective matters as "readability" or "expressiveness" - I like that too. What I don't get is why do they confuse their impressions with facts and why do they try to generalise based on them. Is it that hard to admit that what's readable to you may be completely unintelligible to someone else?

Comparison of programming languages, outside of some really technical metrics, will always be subjective and preference-based. Discussing metrics as vague as "readability" without even agreeing on what it means is absolutely pointless. Yet so many man-hours go into debates and blog posts, sometimes even books, which cover such issues. It's stupid, straw-man discussion every single time it appears.

I really wish people would stop writing lengthy posts with a sole purpose of informing the world about their preferences. It's not that I'm against people having preferences, I'd just like them stated as preferences, not facts, and preferably only when they are not repeated a millionth time this month.

Edit: also, this: http://joelgrus.com/2013/12/24/why-programming-language-x-is...

Post reply on HN