5 ms·
The syntax "crowding" could be solved by scoping macro rules. Maybe `macro class, foo, bar` at the top of the file?
by pfraze 13y ago
The syntax "crowding" could be solved by scoping macro rules. Maybe `macro class, foo, bar` at the top of the file?
- jlongster 13y agoThe next big thing sweet.js is working on is modules. You will be able to actually pull in macros just like you would ES6 libs: import { foo, bar } from "macros"; The scoping of macros will all stay in tact; any other macros from "macros.js" will be available, but the code that `foo` or `bar` expands to will be able to access them (this is really nice for helper macros and other things). So yes, modules are going to be a big part of distributing and composing macros.
- 6cxs2hd6 13y agoRacket shows how, with strong module support, a whole "tower of languages a.k.a. macros" can work reliably. Else not so much.
- klibertp 13y agoAlso, macros in racket are lexically scoped. Any modern macro system should follow their design, IMHO.
- jlongster 13y agoI just noticed a typo: I said "will be available" when I meant "will not be available". Any macros you don't import will not be in scope.