Fully dynamic d by opDotExp overloading
Nick Sabalausky
a at a.a
Fri Apr 17 15:04:59 PDT 2009
"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
news:gsamou$204u$1 at digitalmars.com...
> Nick Sabalausky wrote:
>> class Foo
>> {
>> void bar() {}
>> }
>>
>> auto foo = new Foo();
>> traits(foo).func("bar").invoke();
>>
>> That way, you can have the benefits of
>> runtime-string-identifier-invocation (and have it on *every*
>> class/method), but without completely loosing compile-time checking on
>> the members of every class which is capable of using it.
>
> I was expecting this objection. I think it's not based because unifying
> syntax is a major part of adding such a feature. If we get to dynamic
> invocation but we can't go the last mile, we failed. Look at
> IDispatch-based programming in C++ vs. interpreted languages.
>
Can you clarify what you mean here?
>> ...Doesn't necessarily mean both sides have valid points. Just that
>> there's disagreement. Outside of diplomacy, it doesn't make any sense to
>> agree with something you disagree with, or disagree with something you
>> agree with, just for the sake a closing a rift. Better to just continue
>> debating the issues with logical arguments. If nothing gets accomplished,
>> well ok, fine, but so what? That's a lot better than coming to
>> hasty-but-wrong agreement just for the sake of agreement.
>
> Of course. One thing that suggests the righteousness is not necessarily on
> your side is that plenty knowledgeable, intelligent, credible people use
> and advocate dynamic typing. Asserting that they simply miss the point is
> a bit tenuous.
>
No one's infallible no matter how smart or capable (and there's been plenty
of examples of supposedy brilliant people doing crazy things like joining
wacko cults, etc). I'd be wary of treading so close to [inverse] ad hominem
territory. (Besides, aren't there not plenty of "knowledgeable...etc" people
on the static-typing side? Like you and Walter? ;) )
>> I guess what I'm saying is, people coming to an agreement is all fine and
>> dandy, but the most important thing is to arrive at the *correct*
>> agreement. If one group of people insist that "2+2=0" and another group
>> insists that "2+2=10", then it's far better to keep analyzing and
>> debating until "2+2=4" is discovered and proven than to say "let's all be
>> happy!" and hastily agree that "2+2=5". Again, outside of diplomacy,
>> people disagreeing is not the real problem, the real problem is that the
>> best answer either hasn't been found or hasn't been unquestionably shown
>> to be best.
>
> I'm with you, and in wake of my frequent postings I guess it's pretty
> known by now that nothing makes me more annoying than knowing 100% I'm
> right :o). Certainly I'm not one who "agrees to disagree" and I'm glad you
> aren't either.
>
:)
More information about the Digitalmars-d
mailing list