From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: (*) -> 1 Date: Wed, 18 Jan 2023 16:15:53 +0300 Message-ID: References: <87sfg9kuya.fsf@web.de> <87bkmxkpzg.fsf@web.de> <878ri1av5j.fsf@telefonica.net> <874jspaso5.fsf@telefonica.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: help-gnu-emacs@gnu.org To: =?utf-8?B?w5NzY2Fy?= Fuentes Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 18 14:55:56 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pI8ux-0002Yk-7e for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 18 Jan 2023 14:55:55 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pI8uH-0003FX-4Y; Wed, 18 Jan 2023 08:55:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pI8uA-0003FG-FL for help-gnu-emacs@gnu.org; Wed, 18 Jan 2023 08:55:06 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pI8u8-0004fb-El for help-gnu-emacs@gnu.org; Wed, 18 Jan 2023 08:55:06 -0500 Original-Received: from localhost ([::ffff:197.239.11.163]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000010394E.0000000063C7FA38.00002123; Wed, 18 Jan 2023 06:55:04 -0700 Mail-Followup-To: =?utf-8?B?w5NzY2Fy?= Fuentes , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <874jspaso5.fsf@telefonica.net> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142356 Archived-At: * Óscar Fuentes [2023-01-17 22:06]: > I think your confusion comes from an assumption that everybody else on > this conversation is blind to, in the sense that nobody (I didn't read > most of the thread, though) didn't explicitly stated it: > > + in Elisp is not the "plus" operation that we all know (the same C uses > and school children use.) + in Elisp is not the binary operation, it is > the summatory operator, which takes a list of arguments and returns the > sum of them all. > > In that sense, maybe you can see more naturally that "the sum of nothing > is zero." This makes possible to apply the + (summatory!) operator to > any list of numbers, including the empty list. Do you mean with "C uses" that "C language uses"? > The language designers pursue convenience and consistency and take > decisions based on some sense of what is "natural". Hence if we see as > reasonable that the summatory of an empty list of arguments is zero (the > identity element for summation) and we want for as much operators as > possible to work on empty lists, we also choose to return the empty > element for the underlaying operation of the operator on those cases. > There are more supporting "reasons" for doing that, such as: OK I understand it as hypothesis, though is there reference that it was that way? Still missing the use case. I see it this way: - For this I don't see clearly why we are supposed to imagine 1 when two factors are required for multiplication. I would rather like error for missing argument. (* 2) ➜ 2 - Following makes no sense at all if we can't find actual usage for it. (*) ➜ 1 When we talk of identity elements, then I read here: https://en.wikipedia.org/wiki/Additive_identity In mathematics, the additive identity of a set that is equipped with the operation of addition is an element which, when added to any element x in the set, yields x. But we have here case of "not adding additive identity", because is not there: (+) I would say that (+ 2 0) ➜ 2 demonstrates the additive identity. It has to be added to other elements to be additive identity, it does not spring out of nothing. In that reference they speak of showing the identity first, not "without showing it at all", if nothing is there, then nothing was subject of addition, and so there is no result with additive identity. Similarly see here: https://brilliant.org/wiki/identity-element/ where it says: "An identity element in a set is an element that is special with respect to a binary operation on the set: when an identity element is paired with any element via the operation, it returns that element" So there must be elements in first place to say that something is identity element. We speak of absence of any elements. One less important question is why author of Lisp decided to yield 1 for (*), more important questions is of the use of it. Practically I found one use during sketching stage of programs, just to write it there as preliminary placeholders, like: (* (*) (*)) then in few minutes it is then expanded to: (* (* specific-gravity cubic-meter) (* )) then to be expanded to: (* (* specific-gravity cubic-meter) (* excavator-cycles hour)) Apart from few references on Internet we talked about, I cannot find uses for it, or purpose, it seem difficult. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/