In message "Re: [ruby2] will $ for global disapears in ruby2?"
on Tue, 12 Apr 2005 01:54:38 +0900, Lionel Thiry <lthiryido...@skynetnospam.be> writes:
|I remember some posts saying that $ for globals will disapear from ruby2. Is it
|still the case?
$-variables will not disappear. Some of perlistic $<figure> variables
might.
matz.
Is there a ruby2 white paper or something?
-Jeff
I remember some posts saying that $ for globals will disapear from ruby2. Is it
still the case?
If I correctly remember arguments for that disapearance are:
1) short globals $', $:, etc, are too cryptic (and perlist)
2) globals are not good/true OO
3) globals may instead be managed through some module or class
module Globals
@my_global = "default value"
class <<self
attr_accessor :my_global
end
end
puts Globals::my_global # => default value
--
Lionel Thiry
Too bad for me, I was thinking about writing an RCR that would reuse the $ sigil.
--
Lionel Thiry