From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.tangents Subject: Re: (*) -> 1 Date: Fri, 20 Jan 2023 14:02:43 +0100 Message-ID: <87a62dl55j.fsf@gnu.org> 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 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21890"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.16; emacs 30.0.50 Cc: emacs-tangents@gnu.org To: Jean Louis Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Fri Jan 20 14:25:45 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 1pIrOq-0005To-RK for get-emacs-tangents@m.gmane-mx.org; Fri, 20 Jan 2023 14:25:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pIrEV-00085B-SZ; Fri, 20 Jan 2023 08:15:03 -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 1pIrDr-0006m0-8X for emacs-tangents@gnu.org; Fri, 20 Jan 2023 08:14:23 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pIrDp-0000of-DL; Fri, 20 Jan 2023 08:14:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=9+Qvw7hpY4XNUM9pvSUKynEJObfG0iXamSsR1BGmnAg=; b=KkWOYUJyzTeg2F DwSQKatkHYVHTmiRX2ab4FlXPFntNpB9Hxu5X6PN6n+chtbV+lNTU6vgmM/rLfzJAGSA8eYH4x48U iGAQ4ab44z8wzIJvurxDRwj4JTmZaGzWNnj7RH68Zsht5uYZzC6exdFvk7H2tD5qk4Q3SCG8rkgYU tlDczywyzYzBn5c4sC23SXCPvBTQ4cIS/JOepv1F5Zx3mA4itcEIfTvIuxw3b8yGAAFDEYp1E7T3N vPZz35pn9ET+UDs5aTZVmwAYfizKjfQMVCV26VsfYexHiuNwFXEdtbdeOTHKh88M0RZC43M0CE4Nd FbkEi+sSWwh4Tlejygrw==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pIrDp-0002nQ-5C; Fri, 20 Jan 2023 08:14:21 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id AEE3D27C0054; Fri, 20 Jan 2023 08:14:18 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 20 Jan 2023 08:14:18 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudduvddgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpehffgfhvfevufffjgfkgggtsehttd ertddtredtnecuhfhrohhmpefvrghsshhilhhoucfjohhrnhcuoehtshguhhesghhnuhdr ohhrgheqnecuggftrfgrthhtvghrnhepudejtdehuddvleffjeekteegvdehleehvdeufe fhueekkeekhedvgfeggeffvefgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm pehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlih hthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgr shhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Jan 2023 08:14:18 -0500 (EST) In-reply-to: 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:972 Archived-At: Jean Louis writes: >> 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:09 It is a "feature" that NIL propagates through > arithmetics Well, but with (*) and (+), there is no single NIL involved! And in Elisp (+ nil), where actually a nil is involved, you get an error. > 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:12 What is a call like (*) useful for? > > As you see, author also asked naturally why is it useful. So go and ask why he thinks (apply '+ ()) -> NIL is more useful than 0 given that the sum of the empty set of numbers _is_ 0. >> 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. It's good to signal an error when the expression is wrong as does Elisp with (+ nil) (* 1 2 nil) (apply #'+ (list 1 nil 19)) (+ 2 "i am not a number") but when there is no nil or otherwise wrongly typed value involved, there's nothing to signal. Bye, Tassilo