T
Trans
I have a bone to pick. I tire of accounting for both method terms 'map'
and 'collect'. Anytime I create a method like #collect_with_counter I
feel obliged to create an alias #map_with_counter. And at this point my
collection of useful methods has a pretty good number of them. So my
feeling incerading become "This town's just not big enough for the both
of 'em". Besides its a waste of useful semanitic space.
Now when it comes to choosing between the two, I'm go for 'collect'
because its meaning is clearer to me even though its not as concise.
To me 'map' indicates 'hash' and its a strech to think of the resulting
array as a map. I suppose 'map' indicates that an input element
coorepsonds a resulting output element --but still that's weak. Lots of
things fit that description, like methods. I suspect it was really just
borrowed from lisp. Anyhow I digress.
The point is, can we just settle on one or the other for a future
version of Ruby? Although I prefer 'collect', I don't really care
which. Just pick one.
T.
and 'collect'. Anytime I create a method like #collect_with_counter I
feel obliged to create an alias #map_with_counter. And at this point my
collection of useful methods has a pretty good number of them. So my
feeling incerading become "This town's just not big enough for the both
of 'em". Besides its a waste of useful semanitic space.
Now when it comes to choosing between the two, I'm go for 'collect'
because its meaning is clearer to me even though its not as concise.
To me 'map' indicates 'hash' and its a strech to think of the resulting
array as a map. I suppose 'map' indicates that an input element
coorepsonds a resulting output element --but still that's weak. Lots of
things fit that description, like methods. I suspect it was really just
borrowed from lisp. Anyhow I digress.
The point is, can we just settle on one or the other for a future
version of Ruby? Although I prefer 'collect', I don't really care
which. Just pick one.
T.