Changeset 31147 in project


Ignore:
Timestamp:
07/26/14 15:56:15 (6 years ago)
Author:
sjamaan
Message:

Add a bugs and limitations section for expand-full: it's fundamentally broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/expand-full

    r19761 r31147  
    5151== Bugs and Limitations
    5252
     53{{expand-full}} simply invokes the core {{expand}} procedure
     54iteratively until nothing remains to be expanded.  Unfortunately, each
     55{{expand}} step returns the expansion of the outermost macro only,
     56discarding the syntactic environment used in that expansion.
     57
     58This means that if the expansion uses any macros that were introduced
     59in the expansion or if it uses macros that are only available within
     60the module in which the macro was defined, the next expansion step
     61won't know about these macros, and will fail to expand correctly.
     62
     63The upshot of all this is that expand-full is only useful for
     64expansion of trivial macros.  More specifically, it works only for
     65macros that expand only to other top-level macros.  This includes
     66recursive macros which expand to self-invocations.  Unfortunately,
     67this is a fundamental limitation of the core {{expand}} form, which
     68means it's an unfixable problem for this egg.
    5369
    5470== Author
Note: See TracChangeset for help on using the changeset viewer.