Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
PhilAndrew opened this issue Jan 14, 2013 · 5 comments
Closed

Comments

@PhilAndrew
Copy link

A lot people try to adjust Coffeescript to be their ideal language, for example LiveScript (http://gkz.github.com/LiveScript/) or ParsecCoffeescript (https://github.com/fab13n/parsec-coffee-script) or Coco (https://github.com/satyr/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
Copy link

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.

@PhilAndrew
Copy link
Author

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
Copy link
Contributor

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.

@michaelficarra
Copy link
Owner

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.

@PhilAndrew
Copy link
Author

I feel rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants