From: Conrad Schneiker Date: 2001-03-29T23:12:25+09:00 Subject: [ruby-talk:13326] Re: hash slice implementaion Dave Thomas writes: # matz@zetabits.com (Yukihiro Matsumoto) writes: # # > |I'd like to use Perl's hash slice feature in Ruby. # > |Here is my implemetation of hash slice. # > |How about this code? # > # > It's interesting. The only reason hash#[] does not accept multiple # > argument for slice is consistency with array, which uses [] argument # > differently. If consensus is made, I'd like to merge it. But I # > doubt. # # Given that we've got Hash#indices (OK, not the best of names, # admittedly), and given that we've got parallel assignment, I think # I'd personally vote of consistency over Perl compatibility in this # case. For future reference, does anyone have a (good, clever, obvious) recommendation to (past, present, future) Perl converts for how they should handle this in idiomatic Ruby? Conrad Schneiker (This note is unofficial and subject to improvement without notice.)