matz said more than once that the perlish global variables like
$/ or $: are going away in future releases.
I wonder if is there already a decision, what they will become?
I mean, it’s easy to think that $DEFAULT_INPUT may become a class
variable of IO but what about $1…$n or $: ?
More, would it be possible to have some kind of backward compat via an
external module ?
matz said more than once that the perlish global variables like
$/ or $: are going away in future releases.
I wonder if is there already a decision, what they will become?
I mean, it’s easy to think that $DEFAULT_INPUT may become a class
variable of IO but what about $1…$n or $: ?
For $1…$n there is MatchData which is IHMO a better abstraction. Btw,
I’d prefer to have a MatchData instance in situations like
“foooo”.scan(/.(.)/) {|m| … }
(“m” is an Array here)
$: is IMHO a class constant of Kernel.
More, would it be possible to have some kind of backward compat via an
external module ?