Re:Rubinius X, an experiment in modernizing Ruby
by draegtun on Wednesday October 16, 2013 @08:15AM
(#6559146)
>Ruby still has some ugly stuff inherited from Perl (globals for regex results, or the use of unreadable "magical" globals such as $:)
And Ruby also has some pretty stuff inherited from Perl like postfix statements & first class regex so it wouldn't be good to strip out all of Perl's influences! Gosh even Ruby's blocks are (partly) inspired by Perl's list block functions...
array.map {|n| n * 2}
map {$_ * 2} @array;
However I do agree that Ruby's magical global variables should be removed because they're not dynamically scoped like in Perl.NB. It should be noted that not all Ruby magical variables even come from Perl. For eg. $: doesn't and thankfully Perls $= does something quite different to Rubys! - https://news.ycombinator.com/item?id=5072925
It is also about wiping the slate clean. Ruby still has some ugly stuff inherited from Perl (globals for regex results, or the use of unreadable "magical" globals such as $:). There are many areas where years of experience can help us design a better language.