stdio line-streaming revisited
Sean Kelly
sean at f4.ca
Thu Mar 29 16:41:29 PDT 2007
Walter Bright wrote:
> Sean Kelly wrote:
>> Walter Bright wrote:
>>> Andrei Alexandrescu (See Website For Email) wrote:
>>>> As long as it's not in the language definition, you can't count on
>>>> it. I think this is a language defect anyhow; I am lobbying Walter
>>>> to define left-to-right order of evaluation in all cases.
>>>
>>> It's problematical to define the order of function argument
>>> evaluation, because some calling conventions push left-to-right,
>>> others right-to-left.
>>>
>>> Not impossible, though.
>>
>> It sounds like parameter evaluation order is being confused with
>> evaluation order in expressions? Or is Andrei truly suggesting that
>> function arguments should be evaluated left to right?
>
> Let's say you have:
>
> a.f(b,c);
>
> 'a' can be semantically a function argument, as in
>
> f(a,b,c);
>
> Now, 'a' must be evaluated before f can be called, but whether a, b or c
> are evaluated first is not defined.
Okay, right. This is what I'd expect. Though I suppose it could indeed
be somewhat confusing with property syntax above. Personally though, as
long as this is well documented, I don't see a real need to change it?
Sean
More information about the Digitalmars-d
mailing list