From: Nathan Broadbent Date: 2012-11-14T04:44:35+09:00 Subject: [ruby-core:49315] [ruby-trunk - Feature #7341][Open] Enumerable#associate --e89a8ff1c4e6b2046904ce65a583 Content-Type: text/plain; charset=ISO-8859-1 > > 1) The form you suggest would be redundant with `Enumerable#to_h` > I agree that 'Enumerable#to_h' would seem more appropriate than the block-less version of 'associate'. To me, the 'associate' verb implies that the programmer will provide some logic to determine how the elements will be associated. So I also feel that invocation without a block should return an enumerator. However, if 'to_h' is rejected and 'associate' is all we have to work with, then it would probably be more useful to make 'associate' 'multi-purpose' in the way that is currently proposed. --e89a8ff1c4e6b2046904ce65a583 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
1) The form you suggest would be redundant w= ith `Enumerable#to_h`

I agree that 'Enumerable#to_h' wou= ld seem more appropriate than the block-less version of 'associate'= . To me, the 'associate' verb implies that the programmer will prov= ide some logic to determine how the elements will be associated. So I also = feel that invocation without a block should return an enumerator.

However, if 'to_h' is rejected and 'associa= te' is all we have to work with, then it would probably be more useful = to make 'associate' 'multi-purpose' in the way that is curr= ently proposed.
--e89a8ff1c4e6b2046904ce65a583--