const methods()
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Tue Jan 23 16:38:10 PST 2007
Miles wrote:
> Mike wrote:
>> So in my
>> opinion, the way C++ does const objects is perfect. Cant understand why its not in D.
>
> Me neither.
>
> I read this newsgroup for some years, and have never understood why D
> doesn't have const members, other than "Walter doesn't like them".
>
> There is a teaching that says that we should not try to fix what is not
> broken. So, IMO, while nobody manages to figure out what is broken in
> C++'s const, we should just stick with it. It works exactly how it is
> intended to, and does a good job. Just adopt it.
C++'s const is not "broken" by a certain definition of broken, but it
certainly can be vastly improved. I'm not sure how this idea that
"nobody" figured out what the issues are with C++'s const came about.
Andrei
More information about the Digitalmars-d
mailing list