Re: Naming of arguments to built-in functions

Maybe there are other terms that allows us to differentiate between one or
more values (e.g. item vs. sequence)?

I am wondering if "for-each input" is not misleading as well, as the input
may consist of multiple items, which will then be processed one by one (so
we are actually not processing each input, but each item of the input, à la
“for each item of input”). If the primary input consisted of multiple
values, I’d tend to use the plural form for variable names and write
something like trees.remove(…), houses.foreach(…), or birds.exists().

I’m mostly asking rather than questioning, as English is not my primary
language (a German programming language would probably use a different
wording).




Michael Kay <mike@saxonica.com> schrieb am So., 13. Dez. 2020, 12:40:

>
> Looks good; and I think people will generally be happy to see this
> unified. What about replacing “input” with a singular/plural term,
> such as “item/items”?
>
>
> "items" works fine for some functions such as sort, count, and reverse,
> less well with others such as remove, for-each, exists.
>
> Michael Kay
> Saxonica
>
>

Received on Sunday, 13 December 2020 14:25:11 UTC