[ruby2] will $ for global disapears in ruby2?

L

Lionel Thiry

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
 
Y

Yukihiro Matsumoto

Hi,

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

|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.
 
J

Jeffrey Moss

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" <[email protected]>
To: "ruby-talk ML" <[email protected]>
Sent: Monday, April 11, 2005 11:43 AM
Subject: Re: [ruby2] will $ for global disapears in ruby2?
 
L

Lionel Thiry

Yukihiro Matsumoto a écrit :
Hi,

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

|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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top