Re:Rubinius X, an experiment in modernizing Ruby
by lobster_johnson on Tuesday October 15, 2013 @07:44PM
(#6557113)
It is, at least, about making Ruby more concurrent. Rubinius eliminates the global interpreter lock, which helps, but Ruby's execution model is still very much thread-oriented; Ruby's fibers are very slow, and are not good enough for Node-style concurrency.
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.
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
Is this just about making ruby more like node (substituting callbacks for promises)?
Also, do all of these features really need to be implemented on the interpreter level?