From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs] Date: Mon, 11 May 2020 11:08:25 +0200 Message-ID: <87ftc67sae.fsf@fastmail.fm> References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <87wo5mc04t.fsf@fastmail.fm> <87d07cwtb1.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="18032"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.4.4; emacs 27.0.91 Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 11 11:09:05 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 1jY4Qq-0004a0-TM for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 11:09:04 +0200 Original-Received: from localhost ([::1]:60468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jY4Qp-0005ea-VK for ged-emacs-devel@m.gmane-mx.org; Mon, 11 May 2020 05:09:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY4QL-0005C5-Ff for emacs-devel@gnu.org; Mon, 11 May 2020 05:08:33 -0400 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:57483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jY4QK-0007mm-9O; Mon, 11 May 2020 05:08:33 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1D4A7419; Mon, 11 May 2020 05:08:29 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 11 May 2020 05:08:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm3; bh=qXESmiZ/56NDI6VXQ/3NZHDEMm fVoRhWQeOEioMsjzQ=; b=CbTXG0cQ1nY4mgascel1XqkdDqvSx+3+vOcvE3sl+L kvLi7ln1da9CapksmQWJd94c8um64XSzar0QzH9x5+3cdDKELBtlrMx5AmUj251w fqZRKG3gCfEEz9WVbd07MB3olhLyJ898B0TmWKoCnnuawqBCZ/TXPZyqZLHG0nr+ go8JPbea2fgFL1UMUQhg+xlpYIHTpH5t76T/Pzayi0w1gX4Mc7nIgSyQ3zgZYeCj cgFi8WBNz/sgSwjXPANHAkPBOMxpcubYs9tetfnK6tFs0wCjB+WSPyvgOuliuKU0 5fsBJsJ4SBLFSN2G/A60td53N3ZeFJTCfQ9EUJCfyQ7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=qXESmi Z/56NDI6VXQ/3NZHDEMmfVoRhWQeOEioMsjzQ=; b=rUnhNcRpiw5nHY2y0TBQ/F 4fQPp9dy4Zzh1VAUJ//Suu5jl6bcpCW1msOvzdeSAPfTL1x3LMPVK2hJ1ziD/mQV c8PCSxFtBW2LuerCa0Mi87dULnJ37DtanRzIIWuR1kgofrfm3xWCwyXYuHgaHbF6 uZIm60tRfoalC3wNg3ISVS7zTcIBHBIO+tBZbO32LAAft1ffB4AmpCZihD9h4xDw uMzhxVnENiR0y8pXfjnkyOiF8OnX9LCj9OPzFbmfnO5UaUmTdMGaKSR3Uvpidy6p PjSU2HX4AZHwCSEB9J4qPLuiDIGX+swuWXVwECIemZx2wxokAdSqqfjUIe5xmwMg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrledtgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvufgjfffkgggtsehttdertd dtredtnecuhfhrohhmpeflohhoshhtucfmrhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgv rhhssehfrghsthhmrghilhdrfhhmqeenucggtffrrghtthgvrhhnpefhudffuefhudelhf fgleeukeegudevtedtudduhfefteeugedvvedtuddugffffeenucfkphepleehrdeltddr vddtuddriedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepjhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: from Lenovo.fastmail.com (ip5f5ac93e.dynamic.kabel-deutschland.de [95.90.201.62]) by mail.messagingengine.com (Postfix) with ESMTPA id 1275A3280064; Mon, 11 May 2020 05:08:27 -0400 (EDT) In-reply-to: Received-SPF: pass client-ip=64.147.123.20; envelope-from=joostkremers@fastmail.fm; helo=wout4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 05:08:29 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, 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:249768 Archived-At: On Mon, May 11 2020, Richard Stallman wrote: > > (print (eval (read))) > > > into: > > > (-> (read) > > eval > > print) > > The preference is a matter of taste. If you have a taste for > Lisp, the former > seems totally natural. If you don't, maybe it seems strange. IMHO it's not a matter of having a taste for Lisp or finding `(print (eval (read)))` 'natural' or not. I find it perfectly natural, but there are cases where it becomes difficult to read, especially when you nest not two or three but five or six function calls and/or when each function call has additional arguments, which may be function calls themselves. You can use `let*` to lay out such structures in a way that make them more readable. `->` and `->>` are even better than `let*` in this particular case, because you don't need the intermediate names. > ->> is natural enough, because it adds the carried-over > argument at the end of the list. But -> is unnatural, > since it adds the carried-over argument in the middle of the > list > (after the first element). I think that nested calls are > cleaner than ->. Well, let's agree to disagree on what 'natural' means when it comes to Lisp. :-) To me, Lisp is first and foremost a practical language and if there's more than one way to skin a cat, it's fine if there's more than one language construct to do so. Unlike *some* languages where everything must be an object and you need to contort your mind to use an anonymous function, or where everything needs to be a pure function and doing basic file IO becomes a mountain to climb. (All IME, of course. :-/ ) -- Joost Kremers Life has its moments