[Issue 5519] Saner struct equality

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 3 03:57:56 PST 2011


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



--- Comment #3 from Denis Derman <denis.spir at gmail.com> 2011-02-03 03:55:37 PST ---
The core issue, I guess, is that '==' implicitely means comparison "by value
equality". This sense is even more obvious in D which has a dedicated operator
'is' for comparison "by ref identity".
Current behaviour comparing structs using by ref for their string & array
members may not be wrong in itself, but it conflicts with expected semantics of
'=='. And the case of (interned) string literals makes it inconsistent.

Denis

-- 
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