On 03/01/2011 02:36 AM, Andrei Alexandrescu wrote:
On 2/28/11 12:38 PM, Bekenn wrote:
On 2/28/11 5:48 AM, Andrei Alexandrescu wrote:
One more thing, order of evaluation should still be left-to-right, not
in order of arguments. This means the feature cannot be a syntactic
rewrite (not a big issue, but definitely something to keep in mind).


Andrei

I was thinking that order of evaluation should remain lexically
left-to-right at the point of call (that is, in the order the arguments
are specified, with any remaining default parameters coming after); is
there a reason that would be bad or wouldn't work?

I meant the same as you.

I agree with this. Keeping order makes things simpler, probably helps implementation of the feature (I guess), and removes nearly nothing imo. Named params are about helping reading code.

On the other hand, I would like it still be possible to write:
        void f (x=0, y=0) {...}
        ...
        f(y=1);

This is unorderd strictly speaking...
(Sorry for my possibly wrong English)

Denis
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to