My Long Term Vision for the D programming language

Per Nordlöw per.nordlow at gmail.com
Wed Nov 24 14:13:35 UTC 2021


On Wednesday, 17 November 2021 at 07:25:46 UTC, Robert Schadek 
wrote:
> Also you can not have string interpolation without dynamic 
> memory.

With dynamic memory I presume you mean GC-allocated memory. 
dynamic memory allocation is broader term and covers cases such

```d
@safe pure unittest
{
     scope a = [1, 2];
}
```

which doesn't use the GC, thanks to `a` being `scope`.

However, note that both

```d
@safe pure @nogc unittest
{
     scope a = [1, 2];
}
```

and


```d
@safe pure @nogc unittest
{
     string x, y;
     scope a = x ~ y;
}
```

currently fail but I don't think they should because their 
end-result `a` has life-time limited to the unittest block. And 
therefore having deterministic destruction and without the need 
for the GC and should therefore be allowed in betterC.


More information about the Digitalmars-d mailing list