From: Walter Bright on
Dave Harris wrote:
> However, it's not at all
> clear that const would be worth adding to other languages, and indeed I
> don't think any other languages have it (I'm excluding things like Java
> which have only a half-baked version).

The D programming language has const. It differs from C++ const in that D const
is transitive, and D also supports a transitive "immutable" qualifier that
guarantees that the data won't be changed via another mutable reference.

In other words, const means the data cannot be modified through this reference,
and immutable means it cannot be modified via any reference. This is handy for
things like concurrent programming, where immutable data does not need
synchronized access.

Walter Bright
Digital Mars
free C, C++, D programming language compilers

[ See for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]