recursive equal, and firstDifference functions
Dan
dbdavidson at yahoo.com
Wed Mar 20 04:47:38 PDT 2013
On Wednesday, 20 March 2013 at 03:10:41 UTC, Jonathan M Davis
wrote:
>
> The way == is defined is very clean and straightforward. There
> _are_ bugs which
> complicate things (e.g.
> http://d.puremagic.com/issues/show_bug.cgi?id=3789 ),
> but those can and will be fixed. The design itself is solid.
>
Thanks for the detailed explanation. If 3789 covers strings,
dynamic arrays and associative arrays and it were fixed then I
agree, it is clean and straightforward. If I read it correctly
with this fix it would change the current opEquals from
semantically shallow to semantically deep by default.
Semantically deep equality is comfortable to me, but I would
imagine by now there is a fair amount of code that might rely on
a false result from opEquals if the members (slices, associative
arrays) are not bitwise the same.
Thanks
Dan
More information about the Digitalmars-d-learn
mailing list