Why are globals set to tls by default? and why is fast code ugly by default?

Dennis dkorpel at gmail.com
Fri Mar 31 16:52:59 UTC 2023


On Friday, 31 March 2023 at 16:26:36 UTC, ryuukk_ wrote:
> That the same bad advice as telling people to "embrace OOP and 
> multiple inheritance" and all the Java BS
>
> "just put your variable into a class and make it static, and 
> then have your singleton to access your static variables"

I agree that singletons aren't any better than global variables. 
The better way is to pass state through function parameters.



More information about the Digitalmars-d-learn mailing list