简短回答: 是的,类型。
Slightly less short answer:
You can do what the OP is after in fine style, since coffeescript is written in coffeescript (which is written in coffeescript ;). Sth like ERB templates are probably a better choice if your use-case is very simple, but there s nothing like programmatically manipulating AST structures for really powerful & reusable code-generation.
在这方面,咖啡包显示,几乎是象。 (ssps的喜悦)但不是真的。
Here s an example:
http://blog.davidpadbury.com/2010/12/09/making-macros-in-coffeescript/
nostalgic musing follows
"javascript" was inspired by http://en.wikipedia.org/wiki/Scheme_(programming_language) ... before it was called javascript ... and so coffeescript is kinda bringing JS back to its roots, eliding the marketing jibberish in its syntax, which was shoehorned in because of ill-conceived micromanagement on the part of Sun & Netscape executives.