Attribute transference from callbacks?

Timon Gehr timon.gehr at gmx.ch
Sun Dec 8 15:59:49 UTC 2024


On 12/8/24 06:57, Richard (Rikki) Andrew Cattermole wrote:
> My solution I have proposed plenty, is attribute invalidation.
> 
> So the caller sees a more restricted set, depending upon the callback 
> passed in.
> 
> However Timon didn't like that, thought it wasn't good enough.
> 

It is not.

Completeness: This proposal cannot express even one of the simplest 
forms of composition, function composition. It also will not compose in 
practice.

Soundness: This proposal changes the meaning of qualified delegates 
everywhere in the language and invalidates a lot of existing type system 
invariants. It will be very tricky to maintain both 
backwards-compatibility with plain attributes and soundness.

In practice, it will be complicated, very incomplete, and unsound, like 
`inout`.


More information about the Digitalmars-d mailing list