4 ms·
- In some case implementing both "const" and "non const" methods cause a lot of code duplications and cast can help. - Compatibility with old libraries
by Rexxar 10y ago
- In some case implementing both "const" and "non const" methods cause a lot of code duplications and cast can help.
- Compatibility with old libraries
- WalterBright 10y ago> 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.