[Ecls-list] Feedback needed: interpretation question

Tobias C. Rittweiler tcr at freebits.de
Thu May 6 21:33:53 UTC 2010


Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> writes:

> Assume you find this code
>
> (defun foo (x)
>   (declare (fixnum x))
>  ...
>   (setf x (+ x 2))
>  ...)
>
> Do you interpret the declaration to affect only the INPUT value or the
> variable X as a whole? I would say the first case, but so far ECL has been
> using the second interpretation.
>
> Juanjo

CLHS type [declaration]:

  In particular, values assigned to the variables by setq, as well as
  the initial values of the vars must be of the specified typespec.

Not a question of interpretation, methinks. :-)

  -T.





More information about the ecl-devel mailing list