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: Wed, 15 Nov 2023 01:17:12 +0000 Message-ID: References: <8734xetjkk.fsf@yahoo.com> <87cywhsrcf.fsf@yahoo.com> <87cywgx1z0.fsf@web.de> <83wmuowwp3.fsf@gnu.org> <8334xcwank.fsf@gnu.org> <320999cc-6c83-2315-0044-cc0403400af3@gutov.dev> <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> 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="764"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , michael_heerdegen@web.de, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 15 02:18:33 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 1r34Y5-000Ae7-8D for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Nov 2023 02:18:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r34X7-0001IH-8r; Tue, 14 Nov 2023 20:17:33 -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 1r34X5-0001Hg-Bl for emacs-devel@gnu.org; Tue, 14 Nov 2023 20:17:31 -0500 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r34X3-0001Pq-J5; Tue, 14 Nov 2023 20:17:31 -0500 Original-Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5099184f8a3so8643430e87.2; Tue, 14 Nov 2023 17:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700011044; x=1700615844; 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=v8BNw+mPhgmX1PFAxze8KqChKzs93WTsLGem95h+CzQ=; b=UN9rLyDHmu2Y+hs7j7+qmskVPtD/OGPMBGuEmOENWVl7G5e7CAfEVLoTkcgfko1d2R VdXT9tyKjCUoX1iWl7GD6mP3mHpfkmxPZPeljjzF198+rxZdODKyHdxTuldwNnsjeUje l4mhePjcx0A3/9GPvH0JbMgp4YQ+Fql4v3yPwi1Do74McJvV1bySE+X/iOXDN01468V9 K9QaE809HJtgwlhDkd8YQV8Il6GstpNL5EW7fGBwxcd4GmL99g2uKjrQXl2IWxyLVurk XcQ3ECl2NaSZCj+JOJDhQC1aoplC4sJJWZdis0al5b2WuSSwdmgqsW8251VVQCRGb8V3 Tepw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700011044; x=1700615844; 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=v8BNw+mPhgmX1PFAxze8KqChKzs93WTsLGem95h+CzQ=; b=BPLaxfpX3IIge5AQiJzLN1DzV0ugSBZo8dyn4RmVtKcSHI16n7uG7oe0YCx+6VjwUO pA+BrLIFKDfbuWkNrp9sjq7l01zfsPW0fCLFK1foGRElT2bH61msrxL7njl9W0zZtymG ZhqwLczSQyOoRmLUPfbYAUpzIaR2D/zu61m7WziAJj8KqYbXMFS44cMQsa3UDmI6UsCG T0bbLah15XK0K/xXkRZuTRVjBjJtDdMxnBeEbnrUth2/g/Lxh/F9YNLnwcIWTJG8+A/r GGZRRXircqpr/C0jq6gpwtPVSKslZdfygzjdcGYBMyLOf06PF1IxkrWVPCq2e/XLfBqd Lpdg== X-Gm-Message-State: AOJu0YzxJXH+VIUMTekKQpcnEeoj1XPsBHk74dA/9Yw42boi6xRo73aa iJMa2Rzn/dvqxOEAWXH6IlrJQfaYIJaDMp8WroM= X-Google-Smtp-Source: AGHT+IFtbOUoSiyfQOOGZCWICIhxRCOtSaBV5L5XhqxLSlPMYGlkyrE1+k6t8hWLIqCovlBv8TAJqcg24Mu07vvV2SA= X-Received: by 2002:a05:6512:1294:b0:507:ae8b:a573 with SMTP id u20-20020a056512129400b00507ae8ba573mr9817768lfs.51.1700011044175; Tue, 14 Nov 2023 17:17:24 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x131.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:312747 Archived-At: On Wed, Nov 15, 2023 at 1:07=E2=80=AFAM Jo=C3=A3o T=C3=A1vora wrote: > Not really. Only if I use my seq in contexts where I need that > generic, and being second argument to seq-difference doesn't count. > So why should I bother implementing that when my code is working > fine today? > > But say I did that seq-do, then what is the seq-contains-p generic good > for then? Let me answer that for you... It could be, maybe even likely, that the code was trying to get out of seq-do for some types of operation, because i= n the case of lazy lists, seq-do would mandate the list be completely expande= d. So, while the code works, you seq-difference-3 now calls seq-do on the second argument, and kills my laziness, naughty naughty. Actually for this point to make sense, it doesn't even have to be a bizarre voodoo list. The lazy list may just be expanded enough already for me to know in seq-contains-p that there's a given element there without having to call the generator for more list elements. So seq-contains-p was indeed an optimization, in more or less the sense you described, which is now lost when you tried to optimize for bare Lisp sequences. Jo=C3=A3o