On Thursday, 24 June 2021 at 12:31:08 UTC, Stefan Koch wrote:
On Thursday, 24 June 2021 at 07:28:56 UTC, kinke wrote:
On Thursday, 24 June 2021 at 06:50:44 UTC, Ola Fosheim Grøstad wrote:
[...]

(I don't think I've ever seen one); with `scope c = new Object`, you can have the compiler allocate a class *instance* on the stack for you, but `c` is still a *ref*.

The dmd frontend uses them all the time to avoid allocation overhead for Visitors.

I was talking about not having seen a `scope class C { ... }`, *not* the `scope` storage class as in the example.

Reply via email to