Uncallable delegates

Dukc ajieskola at gmail.com
Sat May 16 04:55:45 UTC 2026


On Saturday, 16 May 2026 at 02:05:17 UTC, Walter Bright wrote:
> On 5/14/2026 7:36 PM, Timon Gehr wrote:
>> Specifically which proposed behavior are you not able to 
>> explain in terms of classes?
>
> The overriding of class functions must behave the same as 
> implicit conversions on delegates.

The DIP is proposing two things: changes to delegate qualifier 
conversion rules, and disallowing calling of delegates of unsound 
types (like `const(void delegate(int))` we discussed. Both 
changes are necessary for type safety, but they still are 
different changes that could be done independently of each other.

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?


More information about the dip.development mailing list