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

MULTIPLE-VALUES OR



 The idea behind Multiple Values is that they are more efficient and 
 cleaner than the basic alternatives of returning a list, or stashing
 values in global variables.
 If using Multiple Values is going to be more costly than 
 these alternatives, then their use will not be widespread.  
 I think they have suceeded in this regard, and believe they will become more
 common at time goes on.  However, I think MULTIPLE-VALUE-OR is a case
 where it fails to live up to its efficiency goals.

 I have written code that needed OR which returned multiple values, (and after
 spending a while tracking down a strange bug that ending up being OR not
 returning multiple values except if its the LAST form), I wrote it as a macro.
 I have since changed the code to store the results in global variables 
 because it made the function much faster, and speed was important for this
 particular function.

 I would like to think Common Lisp implementors will provide non-consing
 &Rest args, since they are very useful for many things, as their use
 on the MIT-based Lisp Machines shows, but it is not a trivial task.
 MULTIPLE-VALUE-OR can be implemented without them (I'll give details
 if anyone really wants to know), but perhaps MULTIPLE-VALUE-OR just isn't that
 widely applicable to warrant special treatment to make it as efficient
 as possible.  If people are happy with that, then I can live with
 using uglier mechanisms when speed and efficiency are important.

 - Kelly