Congratulations to the D Team!

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jul 11 09:45:28 PDT 2012


On 7/11/12 12:30 PM, H. S. Teoh wrote:
> It *is* a problem when you're talking about abstractions. If I have
> million node binary trees and I'm testing for equality, I'd like to be
> able to cache the results. But being forced to use const means I can't
> cache anything. And this isn't just about caching; if my tree is
> partially stored in the database, and I have a DB connection object in
> my tree class, then I can't use opEquals because I can't modify the DB
> state (which is impractical if I have to actually use it to make DB
> queries -- the DB engine may have to cache DB pages, etc.). Any
> abstraction of opEquals beyond the bitwise level cannot be implemented.

How about the static hash/cache?

Andrei


More information about the Digitalmars-d mailing list