Allowing Expressions such as (low < value < high)

"Nordlöw" via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 4 15:03:46 PDT 2014


On Thursday, 4 September 2014 at 22:02:20 UTC, Nordlöw wrote:
> D can also, in this case, do (or will do) common sub-expression 
> elimination because it has a strict memory model (const and 
> immutability) and function purity (template inference).

Correction: foo cannot be pure in this case. But I believe your 
example is misguiding in this case. The most common use case for 
this is when foo is pure.


More information about the Digitalmars-d-learn mailing list