Uncallable delegates
Dukc
ajieskola at gmail.com
Sat May 16 14:30:28 UTC 2026
On Saturday, 16 May 2026 at 06:47:21 UTC, Walter Bright wrote:
> On 5/15/2026 9:55 PM, Dukc wrote:
>> I will analyse your class inheritance analogy later when I
>> have more time, likely this evening. But, if I understand
>> right, your reservations are specifically about the conversion
>> rules. Are you already sold on the need to make some delegates
>> uncallable, or do you have also have some other concerns
>> regarding them?
>
> My concern is this problem is a problem with the implicit
> conversion of a delegate to `pure`. I suggest that problem get
> fixed before going any further with this. The reason is the bug
> examples seem to rely on such an implicit conversion.
Like Timon wrote, there aren't actually any problems (AFAIK) with
`pure` conversions. The DIP also doesn't deal with `pure` - only
with the type qualifiers.
The examples in the DIP do use `pure`, but just to demonstrate
how reasonable compiler optimisations could exploit the broken
type system. You can remove `pure` from the examples and the type
system fault itself - namely, immutable data getting mutated - is
still there.
More information about the dip.development
mailing list