To help LDC/GDC

Walter Bright newshound2 at digitalmars.com
Wed Apr 10 22:48:47 PDT 2013


On 4/10/2013 10:44 PM, Timon Gehr wrote:
> On 04/10/2013 11:50 PM, Walter Bright wrote:
>> ...
>>
>> My point was that competing designs are very probably not necessary. We
>> just need to pull on the string on what must be.
>>
>
> Yes, IMO it is quite obvious how to do it. (transfer the meaning of the
> modifiers from member functions to local functions, disallow conversion to const
> for delegates and disallow loading a mutable delegate from a const receiver.)
> However, I think there are other opinions. There will probably always be as long
> as nothing is specified as the official behaviour.

A delegate works exactly like a member function call. It has an implicit 'this' 
pointer, and how the 'this' pointer is qualified, just like for a member 
function, determines how it works.


More information about the Digitalmars-d mailing list