9 ms·
English.rb: stop writing Ruby like Perl
- stephenr 14y agoWow, 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)
- dragonwriter 14y agoISTR (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.
- phasevar 14y agoThis should be a part of the Ruby distribution.
- dragonwriter 14y agoThe English library is part of the Ruby distribution (its part of the standard libraries.)
- roopeshv 14y agohttp://perldoc.perl.org/English.html http://perldoc.perl.org/English.html perl has it too. So, you can still write ruby like perl
- pre_action 14y agoI 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!
- kamaal 14y agoAsking 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.