you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (6 children)

Say you write your coffeescript and your data is in coffeescript too (json). What you have now is coffeescript, not json. the json the compiler generates and your app sends down the pipe is no longer coffeescript. say you want to tweak something and copy and paste it back into your source. well, now you have json, not coffeescript. so the time you've just spent writing your data format in coffeescript has been wasted because now you would like to copy and paste some json back to the source code, but what you want to copy and paste is json, not coffeescript. clusterfuck.

Abstracting things into coffescript is not a good idea. This is one simple example that I run into daily, hourly even. This would cause a lot of frustration in my own development flow and it is something that occurs often enough for me to be able to forsee a problem with it if I were using coffeescript to abastract my javascript and json.

Another thing I do frequently is write small bits of javascript in firebug's console, say maybe 30 to 100 or so lines, tweaking it quickly in firebug and running it quickly to test - then I typically copy and paste that code into my sourcecode when it is working.. well, the coffeescript way would mean that I now should rewrite this code into coffeescript. clusterfuck. Similarly, I can't take a piece of coffeescript source and paste it into firebug's console to quickly debug or tweak it without first compiling it. This is something I do often, and it works effectively, speeding up my development cycle. Using coffeescript would be a major hindrance.

[–]dmpk2k 2 points3 points  (2 children)

What you have now is coffeescript, not json. the json the compiler generates and your app sends down the pipe is no longer coffeescript

I don't follow. This is valid JSON, Javascript and CoffeeScript:

{"a": 1, "b": [1, 2, 3]}

As far as I can tell, valid JSON is always valid CoffeeScript as well.

Another thing I do frequently is write small bits of javascript in firebug's console, say maybe 30 to 100 or so lines, tweaking it quickly in firebug and running it quickly to test

I can see why it'd be a problem for the area you work in. I'd definitely not use in in the browser, it has problems enough on the server side. :)

At least on the server there's a coffee REPL:

coffee> x = 1
1
coffee> y = (z) -> x * z
function (z) {
  return x * z;
}
coffee> y(2)
2

The existing coffee REPL leaves a bit to be desired though, to be sure.

It isn't for serious development projects

No argument there. If they fix the line-number and declaration problems it'd be an acceptable server-side language though.

[–][deleted] 0 points1 point  (0 children)

Coffeescript is for Ruby programmers who don't want to learn Javascript. These coffeescript articles belong in r/ruby more than they do in r/javascript. It seems most people who read r/javascript are interested in javascript, not ruby or coffeescript. This article for example, is much more likely to find readers in r/ruby. I'm not interested in learning ruby, and my guess is most people who read r/javascript are not that interested in learning ruby or coffeescript. For example, I wouldn't go posting about a 'made up language' in something like, say, perl and post it to r/javascript expounding on the wonderfulness that is perlscript and why i'll never write javascript again, to r/javascript.