Re:Using D to Create the World’s Fastest File System
by WalterBright on Wednesday December 05, 2018 @05:36AM
(#18607112)
The difference between const in D and const in C++ is that D's const is transitive, and C++'s is not.
Transitive const is necessary for things like pure functions. It's more difficult to use because the compiler really, really means it. But when it's there, you (the user) knows that function is not modifying the const data structure, not no-how, not no-way.
Transitive const is necessary for things like pure functions. It's more difficult to use because the compiler really, really means it. But when it's there, you (the user) knows that function is not modifying the const data structure, not no-how, not no-way.