named arguments, string interpolation, please stop.

Guillaume Piolat first.name at gmail.com
Thu Jan 11 22:55:13 UTC 2024


On Thursday, 11 January 2024 at 22:49:51 UTC, Guillaume Piolat 
wrote:
>
> @nogc could get an escape hatch maybe?
> pure is especially annoying because no escape hatch.
>
> Perhaps we can live with their UB in a per-attribute basis.
> UB of @nogc is allocating  with GC, it only annoys in cases 
> without GC, else well, type system was broken.
>
> It's pretty nice to enforce statically no accidental allocation 
> in a time critical callback, in short the reasons that made 
> @nogc invented still apply.

I honestly would rather have nothrow and pure go than @nogc, 
which is going to be used on no-runtime, minimal runtimes (such 
as those that go in limited environments), runtimes with a GC 
that.

It's not avoiding the new that is difficult, it's the array 
literals, the accidental closures, and whatever also allocates 
quietly.


More information about the Digitalmars-d mailing list