Subject: Re: lambda list in MULTIPLE-VALUE-BIND? From: Erik Naggum <email@example.com> Date: 1998/03/08 Newsgroups: comp.lang.lisp Message-ID: <firstname.lastname@example.org> * email@example.com (Lyman S. Taylor) | In short I'd say that the list of variables in MULTIPLE-VALUE-BIND is | just that a list of variables. It isn't a lambda list...... nor was it | intended to be a lambda list. sigh. I _know_ that, dammit. the question is _why_. | How can a function "already" know? There is no restrictions placed upon | the values form. It could be any expression. sigh. when a function returns a number of values, the receiving code (remember? there's actually a computer underneath here) _knows_ at that time how many values it received. it isn't constant, if that's what you think, but it _has_ to know, one way or the other, because it will take actions that depend on such knowledge, like binding variables with no corresponding value to NIL. if it had no clue how many values it received, it couldn't do that, OK? so when it already has that value, I want to cause an error if it is not the number I expect, _without_ having to engage in very expensive operations or cons up the values into a list -- I might just as well return a list, then, were it not for the fact that I do need the distinction between the primary value and the non-primary values in other contexts. | In three of the environments I tried the following example in utilized | mutliple-value-call in the expansion of multiple-value-bind.... However, | one did the following.... the compiler is not obliged to do the same kind of macroexpansion as you are. you have to look at the compiled code or know your compiler better to understand how it does its work. compiler-macros do weird stuff. but aren't you aware that DESTRUCTURING-BIND will barf on the wrong number of bound variables already? there's no need to reinvent it. #:Erik -- God grant me serenity to accept the code I cannot change, courage to change the code I can, and wisdom to know the difference.