Immutable

bachmeier no at spam.net
Sat Mar 27 22:25:19 UTC 2021


On Saturday, 27 March 2021 at 20:44:12 UTC, Brad wrote:
> I was looking through lots of sample code on Rosetta Code.  D 
> has a lot of solutions out there.  That is really nice but it 
> has me wondering - coming from other languages that do not 
> support the concept of immutability - do real world programmers 
> and/or hobbyists really use it as much as I see it on Rosetta 
> Code?  I know it adds a layer of security to your code, but I 
> am still thinking "why?".
>
> Thanks for entertaining a newbie question.

I'm not enough of an expert on immutable to give an informed 
opinion (I don't care for the implementation). Jonathan Davis has 
written this blog post about the limitations of const, which also 
talks about immutable quite a bit:

http://www.jmdavisprog.com/articles/why-const-sucks.html


More information about the Digitalmars-d-learn mailing list