any news on const/invariant?

Janice Caron caron800 at googlemail.com
Wed Nov 28 14:02:34 PST 2007


On 11/28/07, Walter Bright <newshound1 at digitalmars.com> wrote:
> what makes more logical, intuitive sense?
>
> 1) p is a non-constant pointer to const int?
> 2) p is a const pointer to a non-const int?
> 3) p is a const pointer to a const int?
>
> I doubt you'll get a consistent answer from programmers who aren't
> already very used to the wacky C++ semantics.

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.



More information about the Digitalmars-d mailing list