News for hackers. Stuff that matters.
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by mhd on Monday November 08, 2010 @07:40AM (#1882259)
Ah, Coffeescript, the Ratfor of a new generation…
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by jrockway on Monday November 08, 2010 @07:48AM (#1882278)
There is a need for Coffeescript; programming Javascript directly leads to cross-browser issues. Something like Coffeescript can abstract away the per-browser style issues. (The main annoyance I notice is the behavior of trailing commas in lists. In Firefox, it works. In IE, it silently breaks. Coffeescript avoids this issue, since the code you type never sees the browser.)

I would personally find a Javascript->Javascript compiler more compelling, as it would mean I wouldn't need a new editor toolchain. But that wouldn't be as fun to blog about, becuase you would still have to type $("DOM") instead of $ DOM!

Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by mhd on Monday November 08, 2010 @08:37AM (#1882412)
Wasn't abstracting the differences between different Fortran compilers part of the raison d'etre of Ratfor, too?
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by apl on Monday November 08, 2010 @07:53AM (#1882293)
It's mildly annoying. Unlike Fortran, JS doesn't desperately need a preprocessor language. Adding another layer of "abstraction" and some syntactic sugar will make the process of developing good JS needlessly complex and fragile.
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by pygy_ on Monday November 08, 2010 @09:15AM (#1882511)
So "it turns out"[1] that Coffescript will make the process of developing good JS needlessly complex and fragile.

Would you care to elaborate?

From the coffeescript site :

> it compiles into clean JavaScript (the good parts) that can use existing JavaScript libraries seamlessly, and passes through JSLint without warnings. The compiled output is pretty-printed and quite readable.

[1]http://jsomers.net/blog/it-turns-out

Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by m0th87 on Monday November 08, 2010 @09:28AM (#1882544)
When I used it, it cut ~25% of the LoC off my project. And it only took about an hour to learn because the documentation is so damn good. On the usefulness scale, I'd put it next to jQuery and backbone.js.
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by jashkenas on Monday November 08, 2010 @08:39AM (#1882415)
Googling around for Ratfor doesn't reveal the history -- mind sharing what happened with Ratfor in the end? From your tone, I'm assuming it ended in tears...
Re:New Rails-like Framework from 37signals for HTML5 Mobile ... by mhd on Monday November 08, 2010 @08:59AM (#1882471)
It was more a "plus ca change" thought, I actually liked the idea of CoffeeScript, although for my personal work I came to the conclusion that it's not that necessary.

Ratfor itself was mostly a stop-gap solution. Fortran 77 made things a bit easier, and a quite a few developers migrated to C.

I'm actually surprised that there aren't more preprocessors like CoffeeScript. Yes, there are a few languages that compile to JavaScript, but most of them don't aim for ease of integration of existing libraries. So it's just you, your language and the DOM. And if it's just there to supplement your usual backend language (Lisp, Java etc.), you probably don't care that much about node.js.