-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support for hygienic macros #2598
Comments
I like Hygienic Macros, I would like to see a some examples of how it would work. Focus on the "back-end:" What would the generated JS look like? Given CS's philosophy of being "just javascript," I think that's the most important part for acceptance. |
@raganwald well being as they're only compile time, there would only be some var rewriting which CS already does. E.g. _v0, _v1, _v2 etc. Other than that the code would look like any other JS code generated from CS. |
@devinus: This compiler doesn't do a proper gensym. Symbol generation avoids other generated symbols, but not user-defind symbols, making it almost useless. See #2459, #2125, #1574, and others. A proper gensym would certainly be a prerequisite to hygienic macros (hence "hygienic"), and I don't see that ever happening without a complete rewrite, CoffeeScriptRedux-style. |
@michaelficarra What ever happened to two-pass variable naming? |
Stuck in #1574, unlikely to ever be completed. |
Hey hey, easy on the fatalism. "Ever" is a very long time ;) |
Sorry, should have qualified with "without a complete rewrite", as in the last comment. |
Fun ticket -- but I'm at a loss as to how to start addressing this without a fuller idea of how the guts of it would actually work. Closing for now. |
Hello, Googlers, this is back under active discussion at #3171. |
Lately I've been working with Elixir, a language built on it's support for hygienic macros and it's so far been blowing my mind.
Hygienic macros are an old and extremely powerful concept gaining renewed attention. Wanting to use hygienic macros to make "code that writes code," my first thought was CoffeeScript given it's powerful compiler architecture.
@jashkenas has asked me to open this ticket, I assume for posterity.
The text was updated successfully, but these errors were encountered: