What Julia Does Right
zjh
fqbqrr at 163.com
Fri Dec 9 06:22:08 UTC 2022
On Friday, 9 December 2022 at 05:43:56 UTC, FeepingCreature wrote:
> Note that an important attribute of the way I use macros is
> that they're pulled into the compiler automatically, but only
> directly affect code that imports them. So the meaning of
> existing syntax can be overloaded at the use site by a macro
> type like all types can, ie. opCall, opBinary, etc., but you
> only get *new syntax* if you `macro import`. The goal is to
> have a rich central type system that macros can internally fall
> back on.
>
> If you treat macros as compiler plugins that you pass on the
> command line, for instance, you fracture the ecosystem because
> you can no longer combine two libraries with macros that occupy
> the same syntax. The goal is to keep macros, broadly,
> encapsulated to the site of use.
Thank you for your explanation
More information about the Digitalmars-d
mailing list