[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

issue EVAL-WHEN-NON-TOP-LEVEL



In an off-line discussion at the Hawaii meeting, JonL agreed to
withdraw his objection about the bodies of EVAL-WHENs not being
top-level.  However, it appears that some other people are having
problems with the idea of changing the nesting behavior of EVAL-WHEN
in an incompatible way, which makes me think that perhaps we should
separate the nesting issue from the non-top-level issue, or at least
offer an alternative proposal that doesn't mess with the nesting
behavior specified in CLtL. 

To summarize the problem with nesting, suppose I have a whole bunch of
nested EVAL-WHENs at top-level:

    (eval-when <situations-1>
      (eval-when <situations-2>
        ...
          (eval-when <situations-n>
             <body>)
        ...))

The way EVAL-WHEN is specified in CLtL,

    (1) Normal interpreter processing of <body> happens when -all- of
        the nested EVAL-WHENs specify the EVAL situation.

    (2) Normal compiler processing of <body> happens when -all- of the
        nested EVAL-WHENs specify the LOAD situation.

    (3) Compile-time evalution of <body> happens when -one- of the
        EVAL-WHENs specifies the COMPILE situation, and -all- of the
        ones nested inside of that specify either COMPILE or EVAL.

Our existing proposal does not change behaviors (1) or (2), but it changes
case (3):

    -   Compile-time evaluation of <body> happens when the outermost
        EVAL-WHEN specifies the COMPILE situation and all of the ones
        nested inside of that specify EVAL.

There are some other possibilities as well.  For instance, this would
make the COMPILE situation symmetric with the other two:

    -   Compile-time evaluation of <body> happens when -all- of the
        nested EVAL-WHENs specify the COMPILE situation.

And, this one would be somewhat more compatible with the CLtL description:

    -   Compile-time evaluation of <body> happens when the outermost
        EVAL-WHEN specifies the COMPILE situation and all of the nested
        ones specify either COMPILE or EVAL.

Does anybody have any thoughts on which of these behaviors is preferable?
I think they are all implementable.  My own leaning is towards making
the COMPILE situation symmetric if we are going to change things at all.

-Sandra
-------