my d blog has idea of effect system to replace @nogc etc

Sönke Ludwig sludwig at outerproduct.org
Mon Aug 15 16:16:35 UTC 2022


Am 15.08.2022 um 17:08 schrieb Adam D Ruppe:
> In my blog this week, I described an idea I've had percolating in my 
> brain for a bit about a user-defined effect system that could 
> potentially move nogc, safe, pure, etc to library aliases - which would 
> let you combine them as a fun bonus - among other things:
> 
> http://dpldocs.info/this-week-in-d/Blog.Posted_2022_08_15.html
> 
> Like with other inferred attributes, the argument-dependent and virtual 
> function caveats had to be mentioned, but since I talked about them in 
> other posts not too long ago I didn't want to go over it all again.

That would be really nice to have. I also had a similar idea in my mind 
for a while, with lots of potential use cases that came up in the past.

The most prominent example would be something like vibe.d's `@blocking`, 
which currently just acts as documentation, but would be really useful 
if something like `@nonblocking` could actually be enforced at compile 
time - currently there is just a runtime solution for that.



More information about the Digitalmars-d-announce mailing list