From: Peter Zotov Date: 2012-05-28T23:56:56+09:00 Subject: Re: Am I justified to use a global variable if it must be used in all scopes? Robert Klemme писал 28.05.2012 16:38: > In my experience it is extremely rare that I needed global variables > - > so rare I can't actually remember the last time I introduced a global > variable myself. If at all I use pre defined globals like $stderr > and > the like. I find it quite likely that you are using singletons a lot. I'd say that in Ruby, constants are pretty much scoped global variables. Note that I'm not saying this is necessarily bad; I just mean that there's not much difference between "singletons" and "global variables". Both represent global state, and the global state itself should be regarded as possibly harmful, not particular manifestations of it. > > Kind regards > > robert -- WBR, Peter Zotov.