From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Sun, 03 May 2020 08:52:23 +0200 Message-ID: <87ftchy0go.fsf@gnus.org> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="64798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Richard Stallman , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 03 08:53:07 2020 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 1jV8Ut-000Gkn-C9 for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 08:53:07 +0200 Original-Received: from localhost ([::1]:35168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jV8Us-00016e-FJ for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 02:53:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jV8UL-0000hU-Hl for emacs-devel@gnu.org; Sun, 03 May 2020 02:52:33 -0400 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:50062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jV8UK-00032j-5Y; Sun, 03 May 2020 02:52:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: 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=1WVlzRbIp5//dCtYOh//h+O1nq1a+68ddZ5u/rv2gVk=; b=E0kRFW637W0eH/GWXqgFsvhCuW HEdoPMes8j1/aoFWciDKtvj8wSqnpvbQEYqTgSkqaWxusLRvggiWFUAbbl2G3mPKKOLUA2SHmEDtS cIQ4DjCgb+2fJtHjf49JE3vYOM9E0XHTg//4Of6Oz9HhQ/78Lb1cCgAttM/Iph5SIV58=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jV8UB-0006YD-VO; Sun, 03 May 2020 08:52:26 +0200 In-Reply-To: (Stefan Monnier's message of "Sat, 02 May 2020 09:03:49 -0400") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:248639 Archived-At: Stefan Monnier writes: >> Renaming 'concat' seems also like spurious inconvenience in the name >> of rigidity -- the Lisp equivalent of bureaucratese. > > Funny, I find `concat` a perfect example of a bad name because it > doesn't say what it is that it's concatenating nor how. > > If I try to imagine myself a "fresh new Elisp programmer" I can't > intuitively know which of `append` or `concat` does what I want. After giving s.el a cursory look, it seems like it either comes from a Javascript or a Clojure background, and provides names for common Emacs Lisp functions that are easier to remember for people with those backgrounds. There's nothing wrong with that -- like most people, I hate learning things, too. And the number of Javascript/Clojure programmers eclipses the number of Emacs Lisp programmers by several orders of magnitude, so it's no wonder that it's a popular library. But it leads to non-idiomatic Emacs Lisp code. For instance, variadic functions aren't common in those languages, so you end up with oddities like s-prepend and s-append, and if that's what the user thinks is available, then you end up with code like (s-append (s-append (s-append "foo" "bar") "zot") "gazonk") instead of (concat "foo" "bar" "zot" "gazonk") That is, s.el leads to bad Emacs Lisp code, and I don't think it's a good idea to have something like that (even with less lodash-like name) in Emacs. And I think that, since Lisp is obviously better than Javascript, we should just tell people to avoid writing Javascript-in-Lisp and instead, unfortunately, learn some Lisp. It's better in the long run for everybody. As for the common "but just add aliases" to everything, I'm agin it. Programming is 95% reading old code, and having to remember a number of different names for common functions (and verify that they are really equivalent) is not a good language culture to strive for. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no