From: Rick DeNatale Date: 2010-08-02T01:46:02+09:00 Subject: Re: .any?{} Behavior On Sun, Aug 1, 2010 at 12:28 PM, Maurizio De Santis wrote: > Josh Cheek wrote: >> On Fri, Jul 30, 2010 at 10:49 AM, Rick DeNatale >> wrote: >> >>> [].all? {|element| element != 3 }   # => true >>> There may be a better name than non_vacuous_all? but I can't think of one. >>> >>> >> How about #appall? to imply that it is a pessimistic implementation of >> #all? >> :) > > I think that the best name for that method would be > > def all!?(&block) >  !empty? && all?(&block) > end No that doesn't make sense to me all not? Not at all! All not what? Personally I think this attempts too hard to make the method name short, at the expense of revealing the intention. > > It's a pity it is not permitted! > > so I propose > > def strict_all?(&block) >  !empty? && all?(&block) > end I don't like this either, it doesn't evoke the right meaning, to me at least. What are we being strict about? I would tend to read it as following strictly the conventional meaning of the existential quantifier, which the existing Enumerable#all? method already does. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale