auto arr = [1, 2, 3] should be a static array, not a GC allocated array
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Sun Jul 17 04:21:21 UTC 2022
On Saturday, 16 July 2022 at 22:44:07 UTC, welkam wrote:
> On Thursday, 14 July 2022 at 13:14:59 UTC, ryuukk_ wrote:
>> Also why it is GC allocated without requiring ``new``?
>
> Its easier to write average code without always thinking about
> allocations. Its optimized for average coder.
Yes, this could be done as an optimization, if people want to
enforce it then just let them add @nogc.
More information about the Digitalmars-d
mailing list