From: Robert Krajewski
Subject: Re: Keyword args...
Date: 
Message-ID: <ROBERTK.92Mar2124239@rkrajewski.lotus.com>
In article <·······················@cs.cmu.edu> ···@sef-pmax.slisp.cs.cmu.edu writes:

   This is harder than you might think because CL requires the keyword
   arguments to be evaluated in the order in which they appear in the call,
   not the order in which the called function wants them.  So unless the
   compiler can prove that no arg has side effects on any other, it has to
   evaluate the args in the caller's order, then re-shuffle the results.  In
   the worst case, this means that you allocate N local variables in a let*,
   evaluate the args into them, then do the call within this context.

   This is a good argument for not specifying the order of argument
   evaluation.

No, it's not. For one thing, it adds more uncertainty to the language
behavior. It's yet another thing to code around, and doesn't seem
intuitive. Beginners in C get bit by this all the time. Even
"experts" writing code using post/pre-increment operators get screwed
up by this.

If you want to spec a language where the putative implementation
drives and limits the features, there's always C++.

Besides, you're overstating the difficulty of the problem. A good
compiler can get rid of variable binding in a LET* quite easily. Even
if it wimps out on the hard cases, it won't do much harm. If some
expression is hairy enough to be evaluated at a non-optimal time,
chance are its evaluation time is going to be many times greater than
a local-to-argument move.