On Fri, 2 May 2025 at 23:10, Dennis via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
On Friday, 2 May 2025 at 07:44:52 UTC, Manu wrote:
> On a slight tangent; why do I need to attribute the function at
> all for it check `scope` args don't escape?

You don't need @live for that, only @safe and -preview=dip1000.
@live / -preview=dip1021 checks for mutable aliasing, which is
something added on top of `scope` escape analysis.

Okay, so then why should `scope` need `@safe`? It's an additional attribute added in its own right; there's no apparent value to requiring a SECOND attribute's presence in order to make the first attribute take effect.
`scope` should work when you write `scope`. If you don't want scope checking, don't write `scope`...?