Date: prev next · Thread: first prev next last
December 2013 Archives by date, by thread · List index


https://bugs.freedesktop.org/show_bug.cgi?id=71810

--- Comment #4 from Qubit <qubit@runcibility.com> ---
(In reply to comment #3)
Calc functions BITAND, BITOR and BITXOR all have 2 arguments, both with the
name 'number'.

I'd say they might both have *type* number, but I wouldn't use the same
identifier 'number' for both of them.

The order of the two is of no consequence for the result of the functions
(which is not the case with MMULT in bug 71128), so there is no need to give
them separate names.

Generally speaking, I'd suggest that each argument to a function be uniquely
named, even if only number_1, number_2, ..., number_i.

One could even argue that giving the 2 arguments different names suggests
that they are not interchangeable.

If two or more arguments to a given function are given precisely the same name,
I might get the impression that they had to be the same value. I can't think of
a single programming language in which I can refer to the first or nth argument
to a function using interchangeable identifiers. 

Example of ambiguity:

SUM(number, number) {
  return number + number;  // ???
}

IMHO giving the 2 arguments different names is a matter of user interface
policy.
I cc the ux-advise list to hear what they think should be changed or
maintained.

+1, I'd appreciate their input as well :-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.