February 21, 2006
nick wrote:
> Then there is the specific matter of the /in/ keyword being easily
> broken by a c-style pointer. There may be other high-level features
> that are compromised by low-level features. That has to be looked
> into.

Actually, the mere fact that a language purports to be _both_ high level and _to-the-metal_ (as D does), is a _sufficient_cause_ of such avenues of integrity compromise.

We simply can't _enforce_ e.g. constness in such a language. (Hell, if we tried all we could, someone could still circumvent it with an asm block!)

I'd be as bold as to say this goes for _all_ aspects of /secure/ or /robust/ language constructs.

----

In light of this, maybe we should get humble, and just accept the fact that const can at most be an expression of wish -- but as such, a very useful one?
February 21, 2006
> In light of this, maybe we should get humble, and just accept the fact that const can at most be an expression of wish -- but as such, a very useful one?

Agreed.  I like const and use it throughout my C++ code.  And sometimes I do circumvent it, but only when I know exactly what I'm doing.  const being a "hollow promise" does not bother me.  I like the fact that I can break the rules if I need to.

-Craig