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.tangents Subject: Re: (*) -> 1 Date: Fri, 20 Jan 2023 15:46:04 +0300 Message-ID: References: <87zgahj7h3.fsf@web.de> <878rhzvs1h.fsf@web.de> <87ilh28w9u.fsf@web.de> <87r0vqa67k.fsf@gnu.org> <87edrplgee.fsf@gnu.org> 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="5918"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: emacs-tangents@gnu.org To: Tassilo Horn Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Fri Jan 20 14:15:49 2023 Return-path: Envelope-to: get-emacs-tangents@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 1pIrFD-0001N0-Jx for get-emacs-tangents@m.gmane-mx.org; Fri, 20 Jan 2023 14:15:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrEP-0007d1-VP; Fri, 20 Jan 2023 08:14:58 -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 1pIqpP-0002Sv-9X for emacs-tangents@gnu.org; Fri, 20 Jan 2023 07:49:28 -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 1pIqpN-00042P-4C; Fri, 20 Jan 2023 07:49:07 -0500 Original-Received: from localhost ([::ffff:197.239.15.2]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000103952.0000000063CA8DC3.00004020; Fri, 20 Jan 2023 05:49:06 -0700 Content-Disposition: inline In-Reply-To: <87edrplgee.fsf@gnu.org> 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-Mailman-Approved-At: Fri, 20 Jan 2023 08:14:38 -0500 X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.tangents:969 Archived-At: * Tassilo Horn [2023-01-20 12:12]: > Jean Louis writes: > > >> Gosh, Jean, of course nobody would literally write (*) but (apply #'* > >> ...), and you'll find occurrences in emacs: > > > > That has been said that is not necessarily problem or reason. > > I don't understand that sentence. > > > Did you see reference to PicoLisp? > > Yes, and I think it's seriously wrong with > > : (+) > -> NIL > > where its docs say > > Returns the sum of all num arguments. When one of the arguments > evaluates to NIL, it is returned immediately. For some reason PicoLisp is quite different than other Lisp. I have asked author about it. 15:07 may somebody experienced with PicoLisp tell me if (*) returning NIL in PicoLisp is obstacle or feature? It is because I am trying to find use of the function in other Lisp where (*) ➜ 1, however, apparently, the use for it does not exist. I have found PicoLisp returning NIL on empty (*) 15:08 Was author of PicoLisp aware that other Lisp return (*) ➜ 1 at time of making it? 15:08 And what was decision of author, reasoning, why not to include it? 15:08 Hi jmarciano! Well, I'm the author. 15:08 Which reasoning I favor, as I rather like NIL returned, rather than finding out where did I miss to place the numbers. 15:09 Nice to meet you. 15:09 It is a "feature" that NIL propagates through arithmetics 15:09 How does it help instead of providing identity elements? 15:09 (*) especially was not contemplated though, it is a pretty useless call 15:10 but (+ 3 NIL) -> NIL was desired 15:10 and why? 15:11 Were you aware at the time of authoring it, that other Lisp was giving (*) ➜ 1 15:11 It is very convenient. I think I have hundreds of cases where I rely on getting NIL when not all argumets are ready (yet) 15:11 very common in valuen from GUI 15:11 A was not aware 15:11 and never cared about other Lisps 15:12 (*) ➜ 1, (+) ➜ 0, (-) ➜ 0, that is in Emacs Lisp 15:12 Note that PicoLisp is very different from most Lisps anywad 15:12 What is a call like (*) useful for? As you see, author also asked naturally why is it useful. > So why does it return NIL? And why do you apparently consider that > useful? And can something be useful even though it is incorrect? I find it right as with error raising or nil I can find what is wrong. I would not like forgetting some arguments and getting (*) ➜ 1 when instead I had to write something like (* a b). Even this case is rare I find error better, or NIL, as with NIL I can't to other mathematical operations, I will get error: (* nil 2) will not work, and that will help me put attention on it. Similarly (* (*) 2) would raise error putting my attention that I forgot some arguments, then I would correct and write (* (* a b) 2). Something is maybe "correct" in somebody's opionion but have no practical use. And question was not what somebody considers correct, but what is the practical use of it. There are X mathematical subjects that are not injected in Emacs Lisp functions just to be discovered they exist for themselves only. Functions should serve a purpose, not only representation purpose of some mathematica subject. Function `*' to me should serve purpose of multiplication, not representation of set theory or identity elements, UNLESS those identity elements are useful somewhere. And I asked for case where it is useful. There is so far none case found, apart from mathematical representation for those people who like to talk about it. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/