If you want to define greed as imposing externalities on others (e.g. someone who finds that burning plastic in their backyard is legal because of some loophole, and so creates a garbage disposal facility there) then I agree that this is something we should try to avoid, but this is not what has been preached for millennia. In fact the discussion on gentrification shows that most people still cannot distinguish what is and is not an externality.
I couldn't understand what your code was supposed to prove, probably because it was full of premature optimization and mutable state.
> If you want to define greed as imposing externalities on others
No, but I mentioned those things because they can result from greed, which is why greed is bad. If greed didn't result in destructive action, or if the negative effects were borne by those causing them, it wouldn't matter. And those things, multiplied by millions or even billions of people in an endless loop, can lead to vast destruction, too.
> this is not what has been preached for millennia
Whoever oppresses the poor to increase his own wealth, or gives to the rich, will only come to poverty -- Proverb 22:16
But you still haven't shown that Greed is a meaningful concept. Indeed, the link you posted shows
Greed (englisch für Gier) ist:
der Originaltitel des Films Gier (1924)
der Name einer deutschen Band, siehe Greed (Band)
der Name des Albums der Swans, siehe Greed
In my opinion, there is no such thing as greed. There is only maximizing one's own happiness, which can be done through immoral or moral means.
You still have failed to define greed (or show that it causes these bad things you refer to). And your quote is very vague, I have no idea what it is saying a person should avoid doing.
> the inordinate desire to possess wealth, goods, or objects of abstract value with the intention to keep it for one's self, far beyond the dictates of basic survival and comfort.
I couldn't understand what your code was supposed to prove, probably because it was full of premature optimization and mutable state.