News for hackers. Stuff that matters.
Re:Const and Optimization in C by Rexxar on Monday July 25, 2016 @05:26AM (#12157452)
- In some case implementing both "const" and "non const" methods cause a lot of code duplications and cast can help.

- Compatibility with old libraries

Re:Const and Optimization in C by WalterBright on Monday July 25, 2016 @02:21PM (#12160499)
> implementing both "const" and "non const" methods cause a lot of code duplications

D has an `inout` qualifier that has the effect of "transmitting" the const-ness of an argument to the return type.