Why people dislike global variables so much while I find them so convenient?
rempas
rempas at tutanota.com
Thu Jan 27 08:12:03 UTC 2022
On Wednesday, 26 January 2022 at 15:47:06 UTC, Bienlein wrote:
> I once worked on a system (written in Java) that was a huge
> commercial success. The company has a revenue of about €100
> million from it. What later turned out should always have been
> passed on to methods as a parameter was always a global
> function. Now many person years have been spent on development
> and countless lines have been written and there is absolutely
> no way to fix this as the effort in time and money is way to
> large. For some little programs you might get away with some
> globals, but not in case of lage systems.
Thanks for the example! I must say that I didn't though about big
projects that will be shared across a lot of developers.
Thankfully, thanks to all these replays, I have learned my lesson!
More information about the Digitalmars-d
mailing list