study: use checkedint as a drop-in replacement of native long

Gregor Mückl gregormueckl at gmx.de
Wed Mar 24 21:40:07 UTC 2021


On Wednesday, 24 March 2021 at 21:28:24 UTC, H. S. Teoh wrote:
> On Wed, Mar 24, 2021 at 06:38:07PM +0000, Gregor Mückl via 
> Digitalmars-d wrote:
>> On Wednesday, 24 March 2021 at 17:38:14 UTC, H. S. Teoh wrote:
>> > Since there is only one sensible meaning of `a = b = c`...
>> 
>> If I'm reading the spec on expressions right, the compiler is 
>> actually free to interpret that as (a = b) = c if it feels 
>> particularly adventurous. The evaluation order of assignment 
>> operations is explicitly undefined...
>
> Link to spec please?  If what you say is true, that sounds like 
> an error in the spec.  Walter has said many times that 
> evaluation order in D is left to right, unless otherwise 
> indicated. Having it unspecified just leads to a huge can o' 
> worms.
>

See point 1 under "Implementation Defined": 
https://dlang.org/spec/expression.html#order-of-evaluation

"The order of evaluation of the operands of AssignExpression."


More information about the Digitalmars-d mailing list