From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Thu, 02 Nov 2023 11:27:39 +0200 Message-ID: <838r7g8pys.fsf@gnu.org> References: <46ab3c7d-d820-4bb4-8ec4-97c614d7c8a0@alphapapa.net> <871qd8sfdx.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40528"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, joaotavora@gmail.com, adam@alphapapa.net, emacs-devel@gnu.org, stefankangas@gmail.com To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 02 10:28:48 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 1qyU0N-000AMC-Qh for ged-emacs-devel@m.gmane-mx.org; Thu, 02 Nov 2023 10:28:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyTzX-0000lt-9v; Thu, 02 Nov 2023 05:27:55 -0400 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 1qyTzV-0000lk-FL for emacs-devel@gnu.org; Thu, 02 Nov 2023 05:27:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyTzU-00021N-Hs; Thu, 02 Nov 2023 05:27:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=tcCnAYsm+XXhwS7dOZz/DvAk3aqJlNAA62D8ZF6lEsg=; b=WSa/exilhz2hwhEvZFc4 XyPcNIj4PcJIW8MLQlMO7fF4e/XpfWqBUvbZeiSFqe/QTHs6gwow9II3cJ1PoAWU2fjbRaFqTsclC 6g250+U1h9+uWjFny6vBI90N7qRUuJNiLgWvZovOqpJ5ddJvwRV74XY899cFDVwXE4SN/26L/331C JPhylrny3UUcfIj8FreHDvs4E1Bd6Ymil70DFXh0vaR/u0lVsjSFw4Pu78iABCDJhdWaj6P3By6wk UQd1cz+I8MN37Ms+6OFCw6dpDGjmJKI3AWD7NeFUFr56Lw40yNiGZF2b8Q483VHE5AURjoPUbx+cW fe4H3gkDPREUEg==; In-Reply-To: <871qd8sfdx.fsf@posteo.net> (message from Philip Kaludercic on Thu, 02 Nov 2023 08:55:54 +0000) 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:312111 Archived-At: > From: Philip Kaludercic > Cc: João Távora , > adam@alphapapa.net, emacs-devel@gnu.org, stefankangas@gmail.com > Date: Thu, 02 Nov 2023 08:55:54 +0000 > > Richard Stallman writes: > > > It might be ok to add some keyword arguments to `sort', which are more > > unusual and complex to use, but not to simple constructs like > > `pushnew'. This is Emacs Lisp, not Common Lisp. > > What does that last sentence mean? AFAIU, it means that Emacs Lisp traditionally doesn't use keyword arguments, except as relatively rare exceptions. > what constitutes "Emacs Lisp"? It would > seem peculiar if it were to be defined by the arbitrary decisions of the > past, constrained by the contingent circumstances of the time. Those "arbitrary decisions" are what got us to where we are now, 40 years later. So some respect for those "arbitrary decisions" is due, I think. > to me the main aspects and attractions of Emacs Lisp (in contrast to > CL and Scheme) have been: > > 1. Not standardised; it is possible to extend the language without > having to worry about how many implementations will follow along IMNSHO, extending Emacs Lisp as the language is not the main goal of Emacs development. Emacs Lisp is not a programming language on its own, it is a language for implementing and extending features and extensions in Emacs. Thus, the main goal of Emacs development is to develop applications and application-level features, and provide more opportunities for extending the core where that is considered useful. What we have in Emacs Lisp is IMO ample for that purpose. Moreover, most participants in Emacs development are not experts in programming languages, their expertise is elsewhere (which is definitely a Good Thing). Objectively, adding new syntax and semantics to Emacs Lisp does make the source code harder to read and maintain, because it makes the language larger and requires familiarization with those new language features, which more often than not look and feel completely different from the "traditional" Emacs Lisp. So even if we conclude that these additions are worthwhile, we should not pretend they come without a price, and IMO we should think carefully whether their use is justified before we use them in each and every case. > Emacs Lisp can learn from interesting ideas that other > languages provide, adapt and add them, making them available to > everyone. It certainly can. The question is: should it? Since we are not driven by any standard, it is completely up to us to make those decisions, and we should IMO make them judiciously and carefully, taking the downsides into consideration. In particular, I hope people agree that making a language too large and complex is not a good thing in the long run. > If a form expresses something that people frequently want to > do, but either have to elaborate using (unless (memq ...) (push ...)), > then we are making Emacs more useful and expressive by providing the > functionality OOTB. And isn't that the real point of Emacs Lisp? AFAIU, what Richard says is that if some form is frequently used, we should indeed consider adding a primitive or an API for it, but that primitive or API doesn't have to look like CL. Cf the pushnew argument.