From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Fri, 17 Nov 2023 04:47:41 +0200 Message-ID: <28c63f9b-ae93-551a-a60a-2ed1cda465af@gutov.dev> References: <9ab5d2bd-a648-cae0-a4a7-ae86be10af0f@gutov.dev> <87r0kuqxbf.fsf@gmail.com> <54e115a2-fc36-3056-a030-0dbf32416ddb@gutov.dev> <43f290b0-4119-597b-c89a-0fb4c7db1665@gutov.dev> <1e7fe1ef-af7d-3222-7b9e-b569b3c97ccf@gutov.dev> <22e4cb4d-a8f3-1530-881d-b8c59c5d969b@gutov.dev> <339b58d6-5a44-8393-c2cd-4c935147dde3@gutov.dev> <877cmhrcsf.fsf@gmail.com> <56accb10-2a3c-7670-1687-4ae1d7e374e8@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36331"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: =?UTF-8?Q?Gerd_M=c3=b6llmann?= , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= , Eli Zaretskii , michael_heerdegen@web.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 17 03:48:41 2023 Return-path: Envelope-to: ged-emacs-devel@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 1r3ouN-0009Al-Jb for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Nov 2023 03:48:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3otc-000152-Ud; Thu, 16 Nov 2023 21:47:54 -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 1r3ota-00014s-Vu for emacs-devel@gnu.org; Thu, 16 Nov 2023 21:47:51 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3otY-0000qk-03; Thu, 16 Nov 2023 21:47:50 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 817A15C0043; Thu, 16 Nov 2023 21:47:45 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Nov 2023 21:47:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1700189265; x=1700275665; bh=I85QmmqaU6iY9mNgzc0YfTVFy4mkU6agqoy nHNPSYvs=; b=GHqMXvztI5PjWAr89JxwO0ahne7qvCGY0WCw26IGcz062qKA06D SNrsCT0FVrNrmSZCmXbqLB1JrVeqEcgIYfaFy7smFHH4xk5E7vgUjFzc0oxm3eh6 tDG11NFAKCALzCcvXkAE1T1oec9zf04Mtu3daWH5/DjBzSse3CRb2tRqKC85nei7 v+N3okH+m/imvngVKegDGZZkikBgTtmQsFM+rdJ69Qbcz09KFCHEa76if0Rp8URD DZHF8sFgiE2GGTAJCymZpKEuq/MGLF7wPTyYDMhnihjtiRIfD6WZArI33DpkUc6n /Fqw4wxjr/d+H7L3dkvikkFrbZpsVhrZYsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700189265; x=1700275665; bh=I85QmmqaU6iY9mNgzc0YfTVFy4mkU6agqoy nHNPSYvs=; b=gjCl4tzkz7kJleUCR7NHHvAuJQUFyoq808R2/ufhkvwp78tiAEl ALLDy/SAGz+dSvUOWVYd51l6/jqxB7DReL7osvpn6e3ntJwVBtE6RmE8UmAYjCSw wxJD+s3Vcn8M9IesQZwVAcvW6xX/KrBSWzawszdfKjIReT/r72YDD1PVbtPNszB+ 2n8JqoRpVjCLzsIwk2ZvblM0IozyGnJH4NOLSRXXYJvWE1BLJJNYkEmdIY5LpYtx bK2VJHO7Mly0ZPnIhhxH48w1eB5XZ85xu8ACwHOzbpXrtzuRUq321Xciq0PxUass y3xHQ/IEjy/Embb7C5uA6/UQTggagp04CxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudefledggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Nov 2023 21:47:43 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.29; envelope-from=dmitry@gutov.dev; helo=out5-smtp.messagingengine.com X-Spam_score_int: -49 X-Spam_score: -5.0 X-Spam_bar: ----- X-Spam_report: (-5.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-2.193, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312843 Archived-At: On 17/11/2023 04:44, Stefan Monnier wrote: >> But cl-defmethod with just one method resulting in a simple function >> definition in an experimental fact (evaluate (cl-defmethod abc () 345); >> then (cl-defmethod abc () 345) returns (lambda nil (progn 345))), so that >> must be faster, without any computation of applicable methods. > "one method" is necessary but not sufficient for this optimization. > This one method has to have no specializer (aka only the `t` specializer). > >> The comment above the code you quoted mentions "generic functions with >> a single method"; maybe it was written before the above optimization >> was made. > No, that comment refers to the case where there's a single method but > with a non-t specializer, so we can't just always call that one method > without first testing that the arg matches the specializer. Makes sense. Thanks!