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

Issue: PUSH-EVALUATION-ORDER (Version 2)



This is fine with me except for a couple of minor corrections noted
below.

    Date: 23 Oct 87 10:32 PDT
    From: Masinter.pa@Xerox.COM

    I removed all but the :ITEM-FIRST
    proposal, extended it to include INCF, DECF, PUSHNEW, and macros which
    are created with DEFINE-MODIFY-MACRO

You forgot to add these to the References field, although they are
mentioned in the text in a couple of places.  It would probably be
better to list everything that's going to be affected in the References
field, so no one gets confused.

    Proposal: PUSH-EVALUATION-ORDER:ITEM-FIRST

    Explicitly state that for the macros that manipulate generalized
    variables (PUSH, PUSHNEW, INCF, DECF, SHIFTF, ROTATEF, PSETF, SETF and
    those defined with DEFINE-MODIFY-MACRO) the subforms of the macro

"of the macro call", to be strictly accurate.

    (including but not limited to those of the generalized variable
    reference) are evaluated exactly as many times as they appear in the
    source program, and in exactly the same order as they appear in the
    source program.

Good.

    For example, PUSH is expected to behave as if described as:

    (PUSH Item Place) is generally equivalent to (SETF Place (CONS Item
    Place))
      except that the subforms of Place are evaluated only once, and Item
      is evaluated before Place."

I wonder why "roughly" changed to "generally".

    The phase "subforms of the reference" which appears several times in
    CLtL should be made more specific to be "subforms of the
    [generalized-variable manipulating macro] arguments".

"subforms of the macro call".  Also "subforms" doesn't seem to be
officially defined anywhere, we need to be clear on this (see the
message I sent earlier today, same subject).

    Cost of non-adoption:

    Obvious programs may be non-portable, although it should be rare that
    order of evaluation will effect actual operation. 

"affect", unless you're making a very subtle joke here.

    Discussion:

    David Moon (Symbolics) argues that the unstated intention of page 99
    is the definition of the language, while admitting that:

    "The quoted paragraphs could be taken to restrict order of evaluation
    only
       of the subforms of (CAR (ref2)), not all of the subforms of the PUSH
    form."

I think you ought to put back the other part of my comment, since in
removing it my argument is eviscerated.  The paragraph on p.99 two
paragraphs after the one referenced makes it clear, at least to me,
that "subforms of generalized-variable references" was a typo, since
it discusses order of things that aren't such subforms.

I'll send out a proposed revision of the discussion in a second message,
in just a moment.