The current status of D?

Kagamin spam at here.lot
Wed Dec 7 01:29:21 PST 2011


>>>> http://en.wikipedia.org/wiki/Sequence_point
>>> I think ',' in parameter lists are already sequence points.
>> They aren't, but a function call is a sequence point, so bar is
>> guaranteed to be called before baz.
> ?
> If bar is guaranteed to be called before baz, then the ',' is associated with a sequence point. You are right that there is a sequence point before a function call, but that only guarantees that bar and baz are called before foo, and says nothing about the evaluation order of bar and baz (note that function calls are sequence points in C/C++, but the order of argument evaluation is unspecified).
Well, if sequence points don't go in a sequence, that would mean a total mess. Order of argument evaluation is usually unspecified because arguments are usually simple values and thus don't contain sequence points.


More information about the Digitalmars-d mailing list