From: Conrad Schneiker Date: 2001-03-30T02:23:52+09:00 Subject: [ruby-talk:13332] Re: hash slice implementaion Matt Sergeant wrote: # Conrad Schneiker wrote: # > # > 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? # # array#slice() and array#slice()= "Re: hash slice implementaion"? Conrad Schneiker (This note is unofficial and subject to improvement without notice.)