[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ruby2] will $ for global disapears in ruby2?

Lionel Thiry

4/11/2005 4:52:00 PM

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
3 Answers

Yukihiro Matsumoto

4/11/2005 5:43:00 PM

0

Hi,

In message "Re: [ruby2] will $ for global disapears in ruby2?"
on Tue, 12 Apr 2005 01:54:38 +0900, Lionel Thiry <lthiryidontwantspam@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

4/11/2005 5:52:00 PM

0

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

----- Original Message -----
From: "Yukihiro Matsumoto" <matz@ruby-lang.org>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Monday, April 11, 2005 11:43 AM
Subject: Re: [ruby2] will $ for global disapears in ruby2?


> Hi,
>
> In message "Re: [ruby2] will $ for global disapears in ruby2?"
> on Tue, 12 Apr 2005 01:54:38 +0900, Lionel Thiry
> <lthiryidontwantspam@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.
>



Lionel Thiry

4/11/2005 10:32:00 PM

0

Yukihiro Matsumoto a écrit :
> Hi,
>
> In message "Re: [ruby2] will $ for global disapears in ruby2?"
> on Tue, 12 Apr 2005 01:54:38 +0900, Lionel Thiry <lthiryidontwantspam@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.
>
>

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

--
Lionel Thiry