On Wed, Jan 18, 2023 at 08:50:07AM +0100, Óscar Fuentes wrote: > Michael Heerdegen writes: > > > Óscar Fuentes writes: > > > >> The languages that use the concept of partially applied function usually > >> have no support for variadic functions, so the duality problem you refer > >> to is not an issue. > > > > Interesting. I do not know many other languages. > > > > I see your point now: while I wrote about the procedure of finding an > > interpretation [of the technical or mathematical semantics of a formula] > > in the real world [this is what had been ongoing: Ferraris etc], you > > mention that even the technical/theoretical semantics of a formula like > > (*) can be different. This is an interesting point, especially since > > terms like "right" and "wrong" had been used. > > > > Although I think the "meaning" of the expression (*) in Elisp is clear, > > it describes a mathematical term, so the question, asked specifically > > for Elisp, has to be answered using the mathematical background. In my > > understanding the OP asked specifically about the empty algebraic > > product. > > I was prompted to enter the discussion when I saw your reference to > Mathematics. As almost every other math-related thing in computers, > Elisp's + is a toy representation of Sigma. And then the relevant > characteristics of Sigma for this discussion are a convention among > practitioners, not a proper mathematical fact. This goes a bit deeper: whenever you have an associative operator [i.e. (a + b) + c == a + (b + c)], 1. the "variadic extension" is straightforward, since you can leave out the parentheses in (a + (b + (c + ...))) without losing info 2. the extension to zero arguments is also straightforward *provided* you have a neutral element, since 0 + a == a. This works for products, logical and, or, set union and intersection, you name it (in mathematical logic, you often see the or/and cousins of Sigma and Pi; in set theory likewise the union/intersection things). > Although it is possible that the implementors were inspired by Sigma, I > think it is more probable that they made + variadic because s-exps like > (+ (+ 1 2) 3) are awkward and then extended the function with support > for 0 and 1 arguments because they are convenient when defining macros. I think a mathematician doesn't really distinguish between "Sigma" and just "sum". Sigma is just a notation. No magic, just maths. Cheers -- t