From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Short functions Date: Mon, 06 Jan 2025 12:13:54 -0500 Message-ID: <8E77E1B2-0E98-43C9-9DB6-CECD79CA3A3D@dancol.org> References: <173617561349.1583674.17727386803499537943@vcs3.savannah.gnu.org> <20250106150015.2A1DD1043A07@vcs3.savannah.gnu.org> <87cygz7wl8.fsf@daniel-mendler.de> <87a5c37u4s.fsf@daniel-mendler.de> 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="8134"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: emacs-devel@gnu.org To: Daniel Mendler , "Daniel Mendler via Emacs development discussions." , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 06 18:14:52 2025 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 1tUqgl-0001wn-JE for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Jan 2025 18:14:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUqgB-0004Fw-Iq; Mon, 06 Jan 2025 12:14:15 -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 1tUqg7-0004CE-M4 for emacs-devel@gnu.org; Mon, 06 Jan 2025 12:14:11 -0500 Original-Received: from dancol.org ([2600:3c01:e000:3d8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUqg5-0002X5-5Y for emacs-devel@gnu.org; Mon, 06 Jan 2025 12:14:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: References:In-Reply-To:Subject:CC:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=d402aQK9gTTYQ1VEXY/6yyDo4aP3/ZEp0zWoVfHNtdo=; b=Ve+QoYCcZJRva8lxrHrHNv/Nn2 ERFiwP4IWX0OVV49+Ty1dju1fv/CcwPVn6lSc7uK7jDY4zF8llepLf95hEdnYvtUx6P2Y9IkVxZFX iSXgI5mf9c35POmNV587VZVKziGwsxrcm79Bv2EX1XW7Y2bbNT1x7H5hpF5wbEziBANz3u5HWOmDZ RhYWQZr4cYoY5av8So0/agjh1rkrZ4m98AtXV6YbCcKIlL0XxneU7su+4+JnhzOZWVK0+17YNqYJo eSN5gbVpCJ0j7i/ouP0BlbF7MtiynlNyHjB9APCTP/GQDpqZb9dqOo46Fz7JbpDcFBxSrAG0c+xfX FDuI5M7Q==; Original-Received: from 2603-9001-4203-1ab2-45fd-3afc-68a1-5857.inf6.spectrum.com ([2603:9001:4203:1ab2:45fd:3afc:68a1:5857]:36374 helo=[IPv6:::1]) by dancol.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tUqg2-0003Ae-23; Mon, 06 Jan 2025 12:14:06 -0500 In-Reply-To: <87a5c37u4s.fsf@daniel-mendler.de> Received-SPF: pass client-ip=2600:3c01:e000:3d8::1; envelope-from=dancol@dancol.org; helo=dancol.org 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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:327744 Archived-At: On January 6, 2025 12:02:43 PM EST, "Daniel Mendler via Emacs development = discussions=2E" wrote: >Stefan Monnier writes: > >>> There is also a lack in some combinators (flip, curry, uncurry, =2E=2E= =2E) >>> which are occasionally useful=2E Also papply and rpapply, since >>> apply-partially lacks conciseness and sometimes one wants apply the >>> arguments to the right=2E Same with cl-constantly=2E >>> >>> (papply #'f x) >>> (apply-partially #'f x) >>> (lambda (y) (f x y)) >>> (lambda (y z) (f x y z)) >>> >>> (lambda (_) x) >>> (constantly x) >>> (lambda (_ _) x) >>> (cl-constantly x) >> >> I think you're arguing for something like `llama`s ## or to expand #' >> to allow things like: > >Actually I like the explicitly named combinators (constantly, identity, >papply, etc)=2E Nevertheless some Llama-style syntax would be nice to hav= e >in Elisp=2E It doesn't have to reuse the #' syntax=2E Sure, but it'd be nice to maintain the syntactic structure of current code= instead of, say, introducing new punctuation=2E I used to be upset that we= don't have reader macros=2E Now I'm not=2E > >> I'm interested to add new meanings to `function` (aka #') but mostly fo= r >> things like >> >> #'(setf foo) >> #'(peg foo) >> >> to refer to the setters or the peg-matchers of a given name=2E It coul= d >> also be used for > >Good idea=2E > >Daniel >