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.devel Subject: Re: pcase defuns Date: Mon, 20 Dec 2021 06:56:54 +0100 Message-ID: <87pmprzu25.fsf@gnu.org> References: <871r299e5j.fsf@gnu.org> <87y24g4hsb.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="31176"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.5; emacs 29.0.50 Cc: Andrew Hyatt , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 20 08:03:46 2021 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 1mzCi0-0007s9-Mp for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Dec 2021 08:03:44 +0100 Original-Received: from localhost ([::1]:33374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzChy-0006eu-N8 for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Dec 2021 02:03:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzBrU-0002c9-B7 for emacs-devel@gnu.org; Mon, 20 Dec 2021 01:09:29 -0500 Original-Received: from [2001:470:142:3::e] (port=59320 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzBrU-0006uE-0P; Mon, 20 Dec 2021 01:09:28 -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=8rDT3/WmrEKoLPiGDww/Ir0uPcgxcrjlZCe62o2OG5k=; b=aZMz+3L37VB55o khBbUwje454WP4D5iiVf6ytdMDuc3Yc3dtIci2vgrtFCOL6TjCW6WsMJ+ZBrZhARsWkSOc3bRPAiQ VPMjDPgJCSgtPFoMQKWavpi/DbwDC3RHRv8dsZwwRlOQoevJeGkruZ9JQlEhcgMMFk20ZrMMgpD5A 3czzsD+qzWVXgLIHfNasJEouXT/BSquhHoVHO/PdgmLNfQF8p6+HVa4ZLbjiHYqKIh0CVOeVBu4eE RpwVXBGuYimuZ8TC3GDo/4ug6D3Fd46KicezCVXC4/8eL02wVavCE9Jr73TWbKXP6dJcQ8EdNcnl2 t8mw8H/irPGETIdFzfbA==; Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:59235) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzBrT-0000P1-OQ; Mon, 20 Dec 2021 01:09:28 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id D0E3227C0054; Mon, 20 Dec 2021 01:09:25 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 20 Dec 2021 01:09:25 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddtuddgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefvrghsshhi lhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnhepve evieekteekveeigfefffeivdetgeduvdffueeuudevgedttdehvdfhueevfffhnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnhdomh gvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeehvdel kedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Dec 2021 01:09:24 -0500 (EST) In-reply-to: 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" Xref: news.gmane.io gmane.emacs.devel:282508 Archived-At: Stefan Monnier writes: >> Oh dear, my head becomes dizzy when reading their dispatch behavior >> at (info "(elisp) Generic Functions"). Well, I mean, the typical >> uses can be pretty easy to understand but if you mix and match >> different kinds of specifiers, it becomes unwieldy, like what happens >> when you have two methods where one specifies the first argument must >> be an integer and the other says it applies if the first argument is >> (eql 42) [where 42 is obviously an integer]? I can't read a priority >> order between different kinds of specifiers... > > When the specializers are "naturally nested" (i.e. if you take them as > sets, one set is a subset of the other), then the desired precedence > is pretty clear and cl-generic *should* obey that order A quick test with types such as integer and float and eql picking specific elements in the sets specified by those types suggest it works well. > (if it doesn't, it should be considered as a bug, tho I wouldn't be > surprised if someone comes up with examples which we may decide not to > fix). At least I cannot easily come up with some counter-example. Maybe usage of the subr type specializer could result in unexpected results with native-comp given that every function will become a subr there at some point. Bye, Tassilo