When should pure function modify parameters?

Serg Gini kornburn at yandex.ru
Mon Nov 17 15:20:22 UTC 2025


On Monday, 17 November 2025 at 14:46:06 UTC, Brother Bill wrote:
> Also, would you agree that not mutating parameters to have 
> "true" purity would be preferred?

no

> In D, they are allowed to mutate parameters which seems to 
> violate purity.  Why did D make this choice and when to best 
> exploit this architectural decision.

https://klickverbot.at/blog/2012/05/purity-in-d/


More information about the Digitalmars-d-learn mailing list