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

issue LOAD-TIME-EVAL, version 11

    |  If the same (compared with EQ) list (LOAD-TIME-VALUE <form>) is
    |  evaluated or compiled more than once, it is unspecified whether <form>
    |  is evaluated only once or is evaluated more than once.  This can

I find myself strongly opposed to **3.  Given:

  (defun foo ()
    (macrolet ((bar () '(load-time-value (make-instance 'mumble))))
      (list (bar) (bar))))

  (defun foo1 ()
    (list (load-time-value (make-instance 'mumble))
          (load-time-value (make-instance 'mumble))))

I find that I would have a hard time explaining to someone why the value of
foo can be a list of two objects EQ to one another, but that foo1 is
gauranteed to return non EQ objects.  After they grasp that, the next
question is bound to be "Does that mean that in the following example N may
only be incremented by 1?"

  (defun baz (N)
    (macrolet ((bar () '(incf n)))

I've had a hard enough time explaining why

  (let ((x '(a b c)))
    (eq (eval `(quote ,x))
        (eval `(quote ,x))))

should be permitted to return NIL.  My argument has been something like
"The identity of the conses that make up a program shouldn't be significant
to the value of the program".  Proposal **3 sort of shoots down that

I appologize for not being able to put this in the form of a rational
argument, perhaps I will by the meeting.  The added semantic complexity
introduced by **3 just doesn't seam worth it.