Hacker News new | ask | show | jobs
English.rb: stop writing Ruby like Perl (github.com)
4 points by drfatbooty 4861 days ago
5 comments

Wow, I never knew Ruby's predefined global variables were so cryptically named. (Not a ruby developer)

Is there any sane reason it was designed this way (the language I mean, not this fix)

ISTR (and I've never had much knowledge of Perl), the magic globals were lifted directly from Perl and were intended to support Perl->Ruby transition.
http://perldoc.perl.org/English.html perl has it too. So, you can still write ruby like perl
I imagine this works about as well as it does in Perl. Not everybody uses it, so you have to know the short-hand variables anyway, but now you've got an entire new set of magic names to learn! Let's all learn two names for everything!
This should be a part of the Ruby distribution.
The English library is part of the Ruby distribution (its part of the standard libraries.)
Asking people to stop stop writing Ruby like Perl is like asking people to stop writing C++ like C.

Its impossible to that especially when Ruby is 80% perl.