Slow performance compared to C++, ideas?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Jun 3 21:23:35 PDT 2013
On 6/4/13 12:13 AM, Manu wrote:
> The fact that virtual is a one way trip, and it can not safely be
> revoked later and therefore a very dangerous choice as the default is a
> maintenance problem.
Certainly you're omitting a good part of the setup, which I assume has
to do with binary compatibility and prebuilt binaries. In other setups,
final is the one-way trip by definition - it restricts potential
flexibility.
> The fact that I'm yet to witness a single programmer ever declare their
> final methods at the time of authoring is a problem.
Too narrow a social circle? :o)
> The fact that many useful libraries might become inaccessible to what
> I'm sure is not an insignificant niche of potential D users is a problem.
Not getting this. I dare believe that a competent library designer would
be able to choose which functions ought to be overridden and which
oughtn't. The moment the issue gets raised, the way the default goes is
irrelevant. (But maybe I'm just not getting this.)
> And I argue the subjective opinion, that code can't possibly be correct
> if the author never considered how the API may be used outside his
> design premise, and can never test it.
I think you are wrong in thinking traditional procedural testing methods
should apply to OOP designs. I can see how that fails indeed.
Andrei
More information about the Digitalmars-d
mailing list