Fully dynamic d by opDotExp overloading

Nick Sabalausky a at a.a
Fri Apr 17 11:56:24 PDT 2009


"Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message 
news:op.usjnzajzeav7ka at steves.networkengines.com...
> On Fri, 17 Apr 2009 14:32:07 -0400, Nick Sabalausky <a at a.a> wrote:
>
> My main concern that I've read so far is how if a class has a dynamic 
> method dispatcher that's callable like a method, you can't rely on the 
> compiler to help you typecheck (or spellcheck) the *non-dynamic* methods, 
> because it will just default to sending incorrectly typed data or 
> misspelled methods to the dynamic dispatcher.

That is a *very* good point, that hadn't even occured to me.

> I think dynamic methods  have a very limited use, and probably aren't 
> worth polluting the D  language for a few rare cases.
>

Agreed.

> When you know the API ahead of time,  you're almost always better off to 
> have statically typed objects.  When  you don't know it ahead of time, 
> well, I prefer the uglyness of seeing the  quoted strings to having the 
> compiler just start trusting everything I do  ;)
>

Agreed.





More information about the Digitalmars-d mailing list