WAT: opCmp and opEquals woes
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 24 11:30:26 PDT 2014
On Thursday, 24 July 2014 at 01:39:01 UTC, H. S. Teoh via
Digitalmars-d wrote:
> Keep in mind, though, that due to current AA changes in 2.066
> beta,
> existing code WILL break unless we autogenerate opEquals to be
> opCmp()=0. In fact, issue 13179 was originally filed because
> 2.066 beta
> broke Tango. My current stance is that these AA changes are an
> improvement that we should keep, so then the question becomes,
> should we
> break code over it, or should we introduce opEquals =
> (opCmp()==0),
> which would allow existing code *not* to break?
Can we just adjust the AA implementation so that it uses
lhs.opCmp(rhs) == 0 if opEquals isn't defined and produces a
deprecation warning about that? That way, we avoid immediately
breaking folks, but we still move towards requiring that they
define opEquals.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list