4 ms·
Why are braces needed in the Math declaration? Is this not Pythonlike enough to use the indentation, or is there something else?
by TheSOB88 17y ago
Why are braces needed in the Math declaration? Is this not Pythonlike enough to use the indentation, or is there something else?
- jashkenas 17y agoThe braces are there because JavaScript's object literals are already pretty nice. But it would certainly be an interesting feature, if assigning to a block implied an object literal. obj: prop: value prop2: value2 edit: I've opened a ticket for this, here: http://github.com/jashkenas/coffee-script/issues/issue/146 http://github.com/jashkenas/coffee-script/issues/issue/146