Editions Ideas

Walter Bright newshound2 at digitalmars.com
Sun Dec 14 20:21:47 UTC 2025


On 12/14/2025 4:57 AM, Richard (Rikki) Andrew Cattermole wrote:
> ```d
>      scope int* a;
>      {
>          scope int* b = new int;
>          scope int* c = new int;
>          b = c; // Error: scope variable `c` assigned to `b` with longer lifetime
>          a = c; // Error: scope variable `c` assigned to `a` with longer lifetime
>      }
> ```
> 
> b and c should have the same lifetime to scope when it comes to assignments like 
> this. There is no taking a pointer to anything.

I don't see much point to justify the added complexity.


More information about the Digitalmars-d mailing list