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

Re: Misc Queries

    Date: Sat, 23 Nov 85 16:53 EST
    From: David A. Moon <Moon@SCRC-STONY-BROOK.ARPA>
    The second sentence of the last paragraph on page 182 is quite explicit.
    The Spice implementation is not the definition of the language.

Well, now that I notice the sentence, it's pretty plain!  One of the
trouble with huge specs I suppose...  The reason I brought up Spice's
behavior is that a lot of people have based their implementations on
it, so any wrongnesses in it will be propagated unawares.  For instance,
the PCLS package system is actually derived indirectly from Spice, via
HP, who now presumably have something to fix in their implementation!
I don't mean to criticize Spice code either; by and large, it's some of
the cleanest implementation code I've seen, and we should all be thankful
to Fahlman & Co. for making it available.
        3) What is the general theory of destructive operations during lambda
        list processing (such as by initforms)? For instance, how much structure
        should be shared by an &rest binding and &key bindings?
    This would be clearer if you gave an example.  If you're thinking of something
      (defun disgust (&rest r &key (a (setq r nil)) b)
        (list a b))
      (disgust :b 2)
    or even worse
      (defun disgust (&rest r &key (a (setf (second r) nil)) b)
        (list a b))
      (disgust :b 2)
    I don't think we anticipated that anybody would try this when we were designing
    the language.  I'd be happy to say that each of these is an error.
    I wasn't able to come up with any problematic examples that didn't involve
    modifying the &rest argument.  Did you have others in mind?

How about
  (defun more-disgusting (a &optional (b (setq a nil))) (list a b))

This is almost plausible (you could save a supplied-p for b), and the CLM
doesn't disallow it.  Perhaps the spec could be modified to say that
initforms may refer to parameters on the left, but not modify them.

							stan shebs