Delight

bearophile bearophileHUGS at lycos.com
Thu Sep 25 11:20:40 PDT 2008


Yigal Chripun:

>Could you explain why? IMO, this is actually a good idea [not having global state]. it does provide capability based security even if that wasn't the original goal.<

I have never programmed in a language without global state, so I presume I have to try it before criticizing it.
I think of global vars like the "goto" in D: usually (for sizable programs) you can do better without them, but once in a while they may help.
And I think in quick & dirty script-like programs 10-20 lines long that you need to use few times global variables may speed up your programming.

And in D/Python modules I use global functions all the time, I don't use just classes like in Java.

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list