Re: WG: Recovering the once true meaning of type NIL in LOOP
[email protected] (Don Cohen)
| Newsgroups | gmane.lisp.clisp.devel |
|---|---|
| Message-ID | <[email protected]> |
Bruno Haible writes: > > Consider (macroexpand-1' > > (LOOP for (i j k) of-type (fixnum) across #()) > > Who says that this should expand to something reasonable? > > Citing 6.1.1.7 "Destructuring" > "When aligning the trees, an atom in the tree of type specifiers > that matches a cons in the variable tree declares the same type > for each variable in the subtree rooted at the cons." > > So this form declares I as being of type FIXNUM and J and K as > being of type NIL. My interpretation of an atom in the type specifier matches a cons in the variable tree would be fixnum matching (i j k) in (LOOP for (i j k) of-type fixnum ...) so in that case i,j,k would all be declared fixnum, but in (LOOP for (i j k) of-type (fixnum) ...) I would expect the atom fixnum to match only i, and I would NOT expect of-type (fixnum) to mean the same as of-type (fixnum nil nil) so I would expect j and k to be of unspecified type. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-devel