[Joke] C++ and D namings

Ola Fosheim Grostad ola.fosheim.grostad at gmail.com
Wed Jan 20 09:53:34 UTC 2021


On Wednesday, 20 January 2021 at 09:25:51 UTC, Dukc wrote:
> long sum (const int[] arg);
> void foo
> {  auto arr = [1,2,3];
>    auto sum = arr.sum; //codegen can assume that `arr` won't 
> change
> }

The called function has to be @pure, as the slice could reference 
a global...




More information about the Digitalmars-d mailing list