Arc Forumnew | comments | leaders | submitlogin
some versus any
12 points by skenney26 6134 days ago | 6 comments
Why isn't the function some called any? Some implies a few. Even the description of the function uses the word any.


3 points by Darmani 6133 days ago | link

In predicate logic, I usually see the existential quantifier written in prose as "some." I'd imagine this comes straight from there.

You could argue that this is another onion in the varnish, but I prefer some over any. It's one less syllable to say in my head when reading.

-----

5 points by akkartik 6133 days ago | link

Not to mention it's a precious character shorter :)

-----

4 points by euccastro 6133 days ago | link

I like 'any' better too. In the tutorial:

> [...] some, which returns true if the function is true of any element; [...]

Also, although this shouldn't matter much, 'any' is the name of this function in Python.

-----

1 point by zach 6133 days ago | link

That does seem to be the precedent and I initially couldn't fathom why it was not used.

But one good reason is that "some" can be ordinarily used in some declarative senses in which "any" doesn't work. For example, compare:

"I see some of these numbers are odd."

and

"I see any of these numbers are odd."

And even if the second way was ordinary usage, it would seem to imply that all the numbers are odd.

Since "some" has this quality, you can mentally parse Arc statements using "some" into statements like the one above.

-----

1 point by kennytilton 6133 days ago | link

But compare: "Let's see if some of these keys work" and "Let's see if any of these keys work" Above "some"'s usage would mean looking for more than one, whereas "any"s intent is to find one key that works and stop looking.

-----

5 points by chrisdone 6134 days ago | link

Indeed. Some implies more than one. But how many? Etc. I agree with you.

-----