Demian Ferreiro

Results 28 comments of Demian Ferreiro

I'm with @mark-hahn on this one. The CoffeeScript documentation mentions semicolons pretty early (so this is something many people will have read and assimilated): > First, the basics: CoffeeScript uses...

@mark-hahn It's not a valentine's day joke, i fear. The code should is equivalent to: ``` coffeescript a = -> for i in [1..3] return i ``` Which looks more...

The compilation error seems to be triggered only when the for loop is treated as a comprehension. If another statement is added after the loop it compiles: ``` coffeescript #...

@michaelficarra I guess it's a trickier problem than i though. In order to maintain consistency with the original compiler not only would it be necessary to add support for these...

> Not sure why CSR produces a closure here, seems unefficient no? I don't see the use case it fixes Me neither. But but i was trying to point out...

Hehehe. It's funny. It happens to me too in the [on line demo](http://michaelficarra.github.com/CoffeeScriptRedux/). But only if i'm _typing_ the code. If i type `class Foo extends Bar` it starts adding...

Yeah, it's quite a fun bug :smile_cat:. Good luck `git bisect`ing it (BTW, thanks for mentioning that command; i didn't know about it!).

That's why i said good luck `git bissect`ing it hehe. The bug looks to be easily triggered in the on line demo, but not so much in the command line...

A simpler script to test it: ``` $ coffee --eval "console.log ((require './lib/coffee-script/module').cs2js 'a extends b' for i in [1..10])[9]" // Generated by CoffeeScript 2.0.0-beta3 extends$(a, b); function isOwn$(o, p)...

Interesting. I didn't know `throw` could be used as an expression (i assumed `throw` and `return` were the only not valid expressions). I'd always prefer doing: ``` coffeescript throw "bar"...