durusmail: qp: all or both
all or both
2006-02-24
2006-02-25
2006-02-26
2006-02-26
2006-02-27
all or both
mario ruggier
2006-02-26
On Feb 25, 2006, at 5:14 PM, Roger E. Masse wrote:
>> i get hung up about a spec named "both", that will then churn happily
>> away on however many specs it is stuffed with. It just occurred to me
>> that "all" might be a better name?
>
> "all" was avoided in favor of "both" and "any" was changed to "either"
> to avoid colliding with new Python 2.5 builtins.

Ah, pity about this name. "both" and "either" have a nice ring to them,
but they imply 2... making the simple "one, two, many" counting system
of the Pirahã tribe look unnecessarily complicated compared to such an
even simpler "one, many" system... :

Language may shape human thought
http://www.newscientist.com/article.ns?id=dn6303

That aside ;-) I guess you do not like the recommendation of adding a
trailing underscore for clashing names? I.e. to get all_ and any_ ? I
do not care too much for how that looks either, but it probably will
confuse me less.

Other ideas for alternatives:
all: allof, every, each, allornothing ;)
any: anyof, one, atleastone, oneormore

But now knowing why both and either have been chosen, they are looking
less disconcerting. My question becomes -- should I stick with these
names for the client-side version (i.e. in javascript) of spec module
that I am evolving ? Btw, the spec idea translates to javascript rather
wonderfully...

mario

reply