jashkenas--coffeescript/documentation/sections/unsupported_get_set.md

555 B

get and set keyword shorthand syntax

get and set, as keywords preceding functions or class methods, are intentionally unimplemented in CoffeeScript.

This is to avoid grammatical ambiguity, since in CoffeeScript such a construct looks identical to a function call (e.g. get(function foo() {})); and because there is an alternate syntax that is slightly more verbose but just as effective:

codeFor('get_set', 'screen.height')