[Issue 2094] transitive const can be broken easily

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 18 03:28:52 PDT 2008


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





------- Comment #4 from wbaxter at gmail.com  2008-06-18 05:28 -------
(In reply to comment #3)
> So one should write two getters: const and non-const?
> 

That's generally how it's done in C++, yes.
But in D you may need three, actually.  invariant, const, and non-const.
There was much discussion about creating some rules so that D doesn't require
that kind of repetition, but Walter never gave any of the ideas a nod as far as
I know.


-- 



More information about the Digitalmars-d-bugs mailing list