Can you open a pull request? That's the best way to send a diff and have it evaluated.
On Tuesday, May 20, 2014, David Moon <[email protected]> wrote: > I finally found time to get back to this. I found that it was easier to > implement (i.e. many fewer changes to the existing Julia implementation) a > more complex proposal where quote can be either hygienic or non-hygienic > depending on whether it is used inside of a macro. However, it still seems > like it should look very simple and straightforward to macro authors, which > is my goal. > > I have this working on my Linux machine. I can send diffs if anyone is > interested. I don't know whether it is too late to make a change like this > in the 0.3 release. > > Here's my strategy: > > Deprecate esc() and make it not do anything. Instead, quote marks all > symbols that appear directly in the quote, rather than being interpolated, > as hygienic. Post-processing of the macro expansion will replace these > with the appropriate gensym, symbol, or module reference. > > Make a distinction between hygienic and non-hygienic quote, because > quote is not only used by macros. Only hygienic quote does the above. > Quote is hygienic when it is in the body of a macro or inside an > @hygienic annotation. The output of hygienic quote will only work as > part of a macro expansion, it will not work with eval. > > Unary : always behaves the same as quote. > > As a special exception, quoting a single symbol never makes it > hygienic. This seems to be the best compromise to maximize usability > without adding a new construct to reflect the fact that quoting a > single symbol is sometimes used to construct executable code and other > times used just to quote data. > > Fix the few macros in the base code that were broken by these changes. > > In the interest of simplicity, there are NO changes to the C code. > >
