Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [ruby2] will $ for global disapears in ruby2?

0 views
Skip to first unread message

Yukihiro Matsumoto

unread,
Apr 11, 2005, 1:43:26 PM4/11/05
to
Hi,

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.


Jeffrey Moss

unread,
Apr 11, 2005, 1:51:33 PM4/11/05
to
What about optional strong typing and multimethods in ruby2? I saw a lot of
people wanted that with that thread a while back "What would you most like
to see in the next ruby", is that ever going to happen?

Is there a ruby2 white paper or something?

-Jeff

Lionel Thiry

unread,
Apr 11, 2005, 12:52:29 PM4/11/05
to
Hello!

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

Lionel Thiry

unread,
Apr 11, 2005, 6:32:16 PM4/11/05
to
Yukihiro Matsumoto a écrit :

Too bad for me, I was thinking about writing an RCR that would reuse the $ sigil.

--
Lionel Thiry

0 new messages