News for hackers. Stuff that matters.
Re:JS 2 CoffeeScript Compiler by TrevorBurnham on Wednesday September 14, 2011 @10:57AM (#2996486)
It looks weird at first, but it's great when used like so:

    return x unless err
    return y if condition
    ...
    return z
Keeping all of your "return"s at the start of the line makes it much easier to see, at a glance, what the possible return values of your function are. (And, of course, when you see a "return" in the middle of your function, you know there must be a condition attached.)
Re:JS 2 CoffeeScript Compiler by baddox on Wednesday September 14, 2011 @02:06PM (#2997257)
The traditional alternative also puts your returns at the beginnings of lines. It just uses a lot more lines.

    if (!err) {
      return x;
    }
    if (condition) {
      return y;
    }
    ...
Re:JS 2 CoffeeScript Compiler by ww520 on Thursday September 15, 2011 @12:36AM (#2998931)
Not if you do

    if (!err)       return x;
    if (condition)  return y;