From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Thu, 16 Nov 2023 16:03:00 +0000 Message-ID: References: <12da6bcb-1818-7fbe-12af-8d4607724332@gutov.dev> <87il6bt4z0.fsf@yahoo.com> <8734xetjkk.fsf@yahoo.com> <87cywhsrcf.fsf@yahoo.com> <87cywgx1z0.fsf@web.de> <83wmuowwp3.fsf@gnu.org> <87fs172i62.fsf@gmail.com> <87y1ey1zn9.fsf@gmail.com> <875y21kbnz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15668"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Augusto Stoffel , Eli Zaretskii , Michael Heerdegen , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 16 17:01:14 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 1r3enq-000400-Hr for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Nov 2023 17:01:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3emo-0003Pr-CN; Thu, 16 Nov 2023 11:00:10 -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 1r3emn-0003Pg-6n for emacs-devel@gnu.org; Thu, 16 Nov 2023 11:00:09 -0500 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3eml-0003hQ-JZ; Thu, 16 Nov 2023 11:00:08 -0500 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-507ad511315so1404854e87.0; Thu, 16 Nov 2023 08:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700150405; x=1700755205; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=p5CTce7t+zrSgnI4CnPaGrFKoZXQx2gtbn1U+acuTXI=; b=gkYkql9hkOurGywoi/ksce94uyzMfk5YBfVEWQvncQO2Gz4ZLUakr9oHiC1oUfD5SZ zBYYTNd+1Bw3LlzoWXmXPqD//GjRqlGaIv6uIIlwtZjMp3jlY+/sLetN/QmnG27rLbQ5 Vel9c4J4LU0fU/coL0SZME7tOpi8WJrrcQpAh0PSYKSjY95Db4DIM+fxiVIWHuC6T53v ECTqTp4GI3ncdJa97iLYZ+nPWanhsWarz7YFpqBNgFz4IDhjzJO9AJv9wmKsBdeva8La 4C2vdnKGfCnvqofEnybY4APDLciHQlB33rxNs3HspSQredtMj3vJIpVuOYEO0sVDPDcj YLew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700150405; x=1700755205; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p5CTce7t+zrSgnI4CnPaGrFKoZXQx2gtbn1U+acuTXI=; b=lqr5SRzR6XJ07rLcs9yz41/rwbj9QQyOhkWvxEBYdshMhB3Hh59Fiar8zzVwOEJax/ EQUl2g4WxM8Osj358DsnO1FTrQRBLz8o6o9Ht2+HAZ5ni29osGwW2mcBW/lM0mjPw2u1 XDgPqh2g1sm3UStaBvX6tdxsIsPCTCZ1VKt6TTtDcDDkLZCveCmOaiWAUwF1QQcsISaF Daz6YAdePtt03oG8uU1PzZ5nvJmVr6eFWsfV3PzvHBghC5c35DAJIc2TGhR7pZyyolmH XT+T2/mzZAv8bC0bpR9MfUbh66s5ElXsaGdZzNRHZ5sS677n7bqU+rbvIJ4x0H09grpN 5v5w== X-Gm-Message-State: AOJu0YwsTJsg0yAsN8l5chcDXFBBvNRW5NX+jVd2/jsIL3SxykwuA/3i GrwK4AVeR4Jkv5pxqdAPa+fj8fljkVTcYnl9fCg= X-Google-Smtp-Source: AGHT+IGYrwgGVZ84AHNaWeNL5l4KntN2x8lXgpEmd2tJyEvWCnNX1ke1DDFZTgy+B3kxqLrLb6vUllCjN42W9Qqt9fI= X-Received: by 2002:a05:6512:1087:b0:500:8f66:5941 with SMTP id j7-20020a056512108700b005008f665941mr15492560lfg.50.1700150404946; Thu, 16 Nov 2023 08:00:04 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x135.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:312808 Archived-At: On Thu, Nov 16, 2023 at 3:43=E2=80=AFPM Dmitry Gutov wro= te: > > On 16/11/2023 16:36, Augusto Stoffel wrote: > >> That breaks any sequence type based on lists. This is exactly the > >> problem I was raising with too-many-generic interfaces, btw. > > Good point. IMO you just can't have both lists and "types based on > > lists" to work together properly; if we defined a method for > > seq-difference on lists, the issue would be the same (I guess that's th= e > > caveat you raised regarding Dmitri's patch). > > Actually, we might not allow custom sequences based on lists to begin > with. E.g. if there are two definitions > > (cl-defmethod seq-length ((l (head :m6-sparse))) > > and > > (cl-defmethod seq-length ((l list)) > > ...is there a well-defined ordering between them which would determine > the one that will be used for (cons :m6-sparse nil)? The former is more specific and kicks in first. So it's an implicit interface already even if it not described anywhere (but it probably is, I didn't check). And then there's the :around, :before, etc methods. Those are perfectly well defined. > If not, the optimization proposed by Augusto should be quite valid. And > whatever custom sequences are added later, should use cl-defstruct or > similar. Looking forward to see benchmarks (and maybe some unit tests) based on the latest branch. If you can, please use my joaot/bench macro it makes all this data easier to digest. Jo=C3=A3o