Allow for DSL's and ability to change the language in some defined areas #138

PhilAndrew opened this Issue Jan 14, 2013 · 5 comments


None yet

4 participants


A lot people try to adjust Coffeescript to be their ideal language, for example LiveScript ( or ParsecCoffeescript ( or Coco (
Also people want to express some problems in their own syntax.

Suggest you allow a way to extent the language in a easy way to allow people to express their problem in their own language which then gets translated to equivalent Coffeescript code. Scala attempts to do this with Scala Macros and DSL support and some other more complex ways, although I'm not suggesting Scala does it in a way that would be useful for Coffeescript.

erisdev commented Jan 19, 2013

Related: #120, jashkenas/coffeescript#2598, numerous others. Macros have definitely been suggested before, and that's probably the best way to implement something like this.


You could take this further and have a language plugin registry, like NodeJS's NPM where you can search for sub-languages and select a sub-language and write your code in that language within that language in a block. Then its easy to write code in the sub-language within Coffeescript.

language "mathml"
then some mathml code markup here

Just a vague suggestion.

gkz commented Jan 19, 2013

LiveScript and Coco can't be sublangauges as they significantly change semantics in some areas (eg. variable shadowing), and thus need to be separate languages.


See #92. Not allowing the language to be dynamically extended was a conscious decision. This way CoffeeScript programs will be syntactically consistent. Sorry for not closing this earlier.


I feel rejected.

@PhilAndrew PhilAndrew referenced this issue in ngn/apl Feb 6, 2013

Mixin with Coffeescript code #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment