dynamic classes and duck typing
Walter Bright
newshound1 at digitalmars.com
Tue Dec 1 03:15:12 PST 2009
Max Samukha wrote:
> On Mon, 30 Nov 2009 22:33:40 -0800, Walter Bright
> <newshound1 at digitalmars.com> wrote:
>
>> I agree. While the compiler currently doesn't check for mixing up
>> properties and methods, I intend to make it do so. I can't see any
>> justification for allowing it.
>
> Bill rightfully mentioned that it would be impossible to dynamically
> dispatch to both properties and methods even if those properties and
> methods don't have conflicting names. And that may really be an
> unfortunate limitation. For example, it would be problematic to
> implement a generic wrapper for IDispatch:
Is there any reason not to just make the IDispatch properties have a
function interface?
More information about the Digitalmars-d
mailing list