[Issue 4290] 'Fragile' opCmp/toHash signature errors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 16 17:21:48 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4290



--- Comment #3 from bearophile_hugs at eml.cc 2010-09-16 17:21:12 PDT ---
Answer to comment2:

I understand what you say only partially. In my opinion silently ignoring the
opCmp() and toHash() like in my first example is not acceptable for the D
language (that was a bug in my code).

The general design of D is to perform safe things on default, and unsafe on
request. And here the safer thing is to perform the conformance tests on
default and disable them on request. I agree that an attribute is better here.
So a @notypeinfo seems better, if it's implementable and useful.

I don't like the @typeinfo/@notypeinfo names a lot because they look too much
tied to the underlying implementation, instead to their true semantic
meaning/purpose.

In LDC there is pragma(no_typeinfo):
http://www.dsource.org/projects/ldc/wiki/Docs#no_typeinfo
So I think it's better to find a different name for the attribute, different
from @notypeinfo.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list