News for hackers. Stuff that matters.

satyr

Re:Dropbox dives into CoffeeScript on Friday September 14, 2012 @06:17PM (#4524278)
Try:

    switch a
      when b
         , c
         , d
        e()
Re:The Problem with Implicit Scoping in CoffeeScript on Thursday December 22, 2011 @06:30AM (#3381197)
And when do you ever want to leak local variables to an outer scope? Never.

Not to mention that loop counters are no different than other `var`iables in JS.

Re:The Problem with Implicit Scoping in CoffeeScript on Thursday December 22, 2011 @12:01AM (#3380465)
The inconsistency doesn't stop there; `for` variables are specialcased:

    bar = ->
      alert "Holy crap cheese is awesome!"

    foo = ->
      for bar of bars
        console.log bar
      return
↓

    var bar, foo;

    bar = function() {
      return alert("Holy crap cheese is awesome!");
    };

    foo = function() {
      var bar;
      for (bar in bars) {
        console.log(bar);
      }
    };
Re:Making Coffeescript’s Whitespace More Significant on Thursday December 01, 2011 @11:55AM (#3300362)
> I suggest it's an error.

So we'd have to give up:

    array
    .map (x) ->
      f x
    .reduce (a, b) ->
      g a, b
Re:Making Coffeescript’s Whitespace More Significant on Wednesday November 30, 2011 @09:28PM (#3298004)
There's no outdented continued call in current CoffeeScript; an outdented line always makes OUTDENT.

(Or are you suggesting to allow such code? I personally see no value in it.)

I believe you mean:

    foo
      bar;
      bash: something;
      thenBlitz.
http://www.inf.ufsc.br/poo/smalltalk/ibm/tutorial/chap3.html...
Re:CoffeeScript hits 1.0 -- Happy Holidays, HN on Saturday December 25, 2010 @07:59AM (#2038883)

  # Fix things CS goofs.
  # Add things CS lacks.