any news on const/invariant?

Walter Bright newshound1 at digitalmars.com
Wed Nov 28 15:00:55 PST 2007


Janice Caron wrote:
> You are of course completely correct about that, Walter. However,
> nobody here is claiming that C++ got it right. Rather, we're saying
> that D /should/ get it right.
> 
> Just because C++ is confusing, doesn't mean D has to be confusing too.

But much of the justifications used here are that C++ is intuitive. It 
isn't, it's just what you're used to.

Also, there are many uses to which const is put. There's no way any 
useful definition of it will be 100% pure and consistent. For example,

	const x = 3;

is inconsistent. But it is far too darned useful to sacrifice for some 
notion of perfection.



More information about the Digitalmars-d mailing list