From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?R8O2a3R1xJ8=?= Kayaalp Newsgroups: gmane.emacs.devel Subject: Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs] Date: Tue, 19 May 2020 02:24:07 +0300 Message-ID: <87r1vgsu7c.fsf@gkayaalp.com> References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <873686bbl5.fsf@russet.org.uk> <87d07963ec.fsf@fastmail.fm> <873685dq73.fsf@russet.org.uk> <87wo5gc0kb.fsf@russet.org.uk> <87lflv5yzx.fsf@bernoul.li> <433E8CA0-CC87-4877-B9D4-D348531B73F8@medranocalvo.com> <87lflsyfwu.fsf@russet.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13223"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 0.9.18; emacs 28.0.50 Cc: jonas@bernoul.li, Richard Stallman , joostkremers@fastmail.fm, adrian@medranocalvo.com, emacs-devel@gnu.org, ohwoeowho@gmail.com, self@gkayaalp.com, Phillip Lord To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 19 01:24:56 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 1jap7w-0003Md-Qv for ged-emacs-devel@m.gmane-mx.org; Tue, 19 May 2020 01:24:56 +0200 Original-Received: from localhost ([::1]:43018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jap7v-0004m9-Tt for ged-emacs-devel@m.gmane-mx.org; Mon, 18 May 2020 19:24:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jap7K-0004Db-9d for emacs-devel@gnu.org; Mon, 18 May 2020 19:24:18 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:58743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jap7I-0002MD-Ig; Mon, 18 May 2020 19:24:17 -0400 X-Originating-IP: 159.146.10.253 Original-Received: from localhost (unknown [159.146.10.253]) (Authenticated sender: self@gkayaalp.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id AF86720003; Mon, 18 May 2020 23:24:09 +0000 (UTC) In-reply-to: Received-SPF: none client-ip=217.70.183.200; envelope-from=self@gkayaalp.com; helo=relay7-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/18 19:24:11 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, FROM_EXCESS_BASE64=0.979, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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:250841 Archived-At: On 2020-05-18 07:42 +03, Stefan Monnier wrote: > FWIW, I'm not too fond of such shorthand syntax. The benefit is not > very high and it makes the language that much more difficult to learn > for newcomers. > > For a programming language like Closure, it might make sense, since > most/all people writing Closure programs are actual programmers that > have to be proficient in Clojure. But Elisp lambdas are very common in > .emacs files, so this additional complexity will be exposed to some of > our users who aren't programmers or aren't proficient in Elisp. I don=E2=80=99t think it=E2=80=99s that much of additional complexity given= many popular programming languages have multiple ways to define one off closures: Python (inline def vs. lambda), JavaScript, Ruby, even C++ these days AFAIU. And, as someone else mentioned, the $ syntax has the nice effect that C-h f can be enough. > If we want to shorten anonymous functions we could start with something > like (=CE=BB (x) (f x 1)), which you can get with > prettify-symbols-mode already. dollar.el and the reader modifications do more than just shortening the keywords tho: it allows to define arguments whose names don=E2=80=99t really matter. Which is why these syntactic patterns go well with map-reduce programs and when passing :key, :test, and simple callback arguments. I=E2=80=99d say random one letter names or one off long names may create mo= re confusion than symbols that boil down to nth arg. -gk.