Why can't function expecting immutable arg take mutable input?

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Oct 16 11:39:01 PDT 2015


On 10/16/2015 03:35 AM, Shriramana Sharma wrote:
> Hello. I still haven't wrapped my mind around the const/immutable thing yet
> and am still stuck in C/C++ mode. :-(

Welcome to the club! :) You can read my understanding of the issue at 
the following link:

 
http://ddili.org/ders/d.en/const_and_immutable.html#ix_const_and_immutable.parameter,%20const%20vs.%20immutable

Ali



More information about the Digitalmars-d-learn mailing list