@disable new can be used to disable the `new` operator on a thing so it isn't accidentally GC managed, which is liable to cause trouble with destructor/finalizer confusion. But it currently disables scope too: ``` class A { @disable new(); } void main() { scope A a = new A(); } ``` scopeclass.d(6): Error: cannot allocate `class A` with `new` because it is annotated with `@disable new()` The purpose of disabling `new` is not the presence of the keyword per se, it has more to do with lifetime management. Like I said, it is about a destructor that needs to be called in a particular way every time I use it. `scope` solves this. So I propose that `scope x = new` be exempt from the `@disable new` check.
> @disable new can be used to disable the `new` operator on a thing so it isn't accidentally GC managed Oh wow, never seen that and haven't found it in the spec... ?
It has been there since the beginning. The spec PR got stalled and closed though https://github.com/dlang/dlang.org/pull/2846/files
Fixed by: https://github.com/dlang/dmd/pull/14403