3 ms·
Look at http://www.digitalmars.com/d/2.0/const3.html http://www.digitalmars.com/d/2.0/const3.html also. C++0x and D both seem to allow compile time evaluation
by jongraehl 17y ago
Look at http://www.digitalmars.com/d/2.0/const3.html http://www.digitalmars.com/d/2.0/const3.html also. C++0x and D both seem to allow compile time evaluation of expressions or even full functions that depend only on constants.
I agree that mutable state is valuable and its use should be easy (boo Haskell).
(note: the example the D article gives of C "int const p" should be "int const p")