All right, all right! Interim decision regarding qualified Object methods
Jonathan M Davis
jmdavisProg at gmx.com
Thu Jul 12 02:15:33 PDT 2012
On Thursday, July 12, 2012 11:07:42 Mehrdad wrote:
> On Thursday, 12 July 2012 at 08:40:25 UTC, Jonathan M Davis wrote:
> > it does appear to solve the const issues that we've been having
> > quite nicely
>
> How would we expect people to deal with these const issues when
> the issues come up in their own libraries?
>
> Or do we not care?
The issue that we're trying to solve here is making opEquals, opCmp, toHash,
and toString work both for const and non-const objects. That's it. We're not
talking about revamping const. It doesn't need it. I know that you're unhappy
with how const works in D, but as a group, we do not believe that it is
fundamentally broken. Rather, this particular situation where OO and const
collide needs a solution. _That_ is what we're trying to solve.
That may mean that you can't use const in your code, because what you're
trying to doesn't work with D's const. But taking care of this issue with
opEquals, opCmp, toHash, and toString will make avoiding const easier for
those that need to for their particular code base.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list