On Mon, Jun 21, 2010 at 3:37 PM, Patrick R. Michaud <pmich...@pobox.com> wrote: > On Mon, Jun 21, 2010 at 09:47:37AM +0100, Smylers wrote: > > On the other hand, many of our other list-y methods also work on > scalars (treating them as a list of 1 element -- essentially a no-op): > .join, .sort, .any, .all, .rotate, .max, .min, .pick, .reduce, .values, > etc. It might be inconsistent that .reverse on a scalar warns when > the others do not. >
Personally I don't see the point of providing such methods and then making them warn. A scalar acting as a one element list is a useful abstraction for generic code. All abstractions are leaky, but this would be too leaky for my tastes. Leon