From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Sweeter Emacs Lisp Date: Wed, 17 Jul 2013 16:04:41 +0200 Message-ID: References: <8738rh6ftk.fsf@gnu.org> <87r4f0wlug.fsf@yandex.ru> <8738rgtnwn.fsf@uwakimon.sk.tsukuba.ac.jp> <51E5ABC1.5040002@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374069901 27659 80.91.229.3 (17 Jul 2013 14:05:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Jul 2013 14:05:01 +0000 (UTC) Cc: fgallina@gnu.org, "Stephen J. Turnbull" , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 17 16:05:03 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UzSLn-0002n3-1A for ged-emacs-devel@m.gmane.org; Wed, 17 Jul 2013 16:05:03 +0200 Original-Received: from localhost ([::1]:51188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzSLm-0000K1-Kw for ged-emacs-devel@m.gmane.org; Wed, 17 Jul 2013 10:05:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzSLh-0000Gu-52 for emacs-devel@gnu.org; Wed, 17 Jul 2013 10:05:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzSLe-0002W1-8E for emacs-devel@gnu.org; Wed, 17 Jul 2013 10:04:57 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:38691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzSLd-0002Vn-UQ; Wed, 17 Jul 2013 10:04:54 -0400 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UzSLR-0001iu-Db; Wed, 17 Jul 2013 16:04:41 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWPh4FxZWM6MkQhBwc4 HyROS2vNzbgRAYtkAAACXElEQVQ4jYWUTXKjMBCFWzawlgxhbSuQdezmAAbkvcNEWQts6/5HmNdg ZyqZTE0vXGU++u/pCar9HOYemuZQBS3P3x6A/g/qr0B/Az/0sJ37E1Vnl+h6svxzkOMPGtcXojLh s0+JVsx9MwP9QpdLoPLKtbV+eGd2bgElwJTqK9uusrZi7p4fpW4j0dOVh9O7978ENAL+2fxLNE2/ TE4uizEaHUx6xp7yZwlycQZKBzyvt3+BUAbR0358A2XIKK7sYG32CZYeqgxIAZFi9ACj0StudHaz duiyOLbZAoI3ZQV5yhG6YjDjzNIj9WbFPfMrgEysHN4GGMm3V+573ocNzhJlio4AZMr20vSVO4TC +zPAZCVDA5wvDVIOkdJ5+QVsBaxxOnzAlMETxelMYcl4W8CIJeCEGOTXtUhQWdL3/T7YxSQzdu7k yZDKnY5xpWfHhRgAqGjtLufG2d0jgzIBx0hqtxYHHG6VOA6vz2BvQ7ZNXFe49vYsXsRoC3Ch3F7d RywANCktct88poJa27WrYyLg+YiMmNQA2VSOAJUu2qnX6z2GLZwHoKvpd4kYo51Yx5Yg3klArqDr umHXxolfYkhhulpAleMkMG4D8XiPnYc7aGHWI3Z9QVNmVTkRNQUwpueHZ3LUwqj+/AQAf1flHUx8 ILOBuyRDbtenAfMmw1TDMd4EDFo9wCi1VrWtLUrVXtO9VqDkNVMbuZ7kanHGAoI7zpbdIAUZcsuV SAoZtcqPREUtWskXwGhTObn8yvSv6DQvOH8XWgOnUjCm4EY8+wnYSGdV7AtmowxE/A2FmfZiIqbI iAAAAABJRU5ErkJggg== X-Now-Playing: Colleen's _The Weighing of the Heart_: "Humming Fields" X-Hashcash: 1:23:130717:stephen@xemacs.org::IDhUC+kwMu0gnLbA:00000000000000000000000000000000000000000008YNO X-Hashcash: 1:23:130717:fgallina@gnu.org::cuod8V6epI1g70xz:0Jp3Y X-Hashcash: 1:23:130717:dgutov@yandex.ru::m6A39WzskwSg3pw8:0gTm8 X-Hashcash: 1:23:130717:emacs-devel@gnu.org::IY/uYCMsJv0naQOf:000000000000000000000000000000000000000000k8UQ In-Reply-To: <51E5ABC1.5040002@yandex.ru> (Dmitry Gutov's message of "Wed, 17 Jul 2013 00:23:29 +0400") User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) X-MailScanner-ID: 1UzSLR-0001iu-Db MailScanner-NULL-Check: 1374674681.72184@TI4Qvr4wfP19nkCU0b6bVA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161971 Archived-At: Dmitry Gutov writes: >> (defun tag-desc-stripped (tag) >> (upcase (replace-regexp-in-string "[<\\/> ]" "" (car tag)))) >> >> hard to read, > > This is still a trivial example. And no, now I don't, having spent a > couple of years or so writing Elisp. But I still remember that reading > functions "from inside out" was one of the harder parts, I've never understood what people mean by "reading from the inside out". In C, that statement would have been upcase(replace_regexp_in_string("[<\\/> ]", "", car(tag))); Of course, if you've only programmed dotted languages like Java, you may have a problem. (That goes without saying in any context, though.) > especially with the level of nesting that one can often observe in > core Emacs packages. There's a cultural element, though. C people have a tendency to assign values to variables more, so you get a more imperative style. (Especially since you have to do a lot of manual memory management stuff, often.) > Here are some appreciative opinions with better examples: > > http://blog.8thlight.com/colin-jones/2011/03/27/clojure-mad-science-an-evil-threading-macro-experiment.html Yeah. that's pretty much incomprehensible and confirms my prejudices against the taste level of the Clojure people. Are you sure they haven't managed to squeeze monads into the language, too? For extra academic brownie points? > Incidentally, Clojure has a shorter reader macro for anonymous > functions. Yours would look like this: > > #(replace-regexp-in-string "[<\\/> ]" "" %) *barf* I love how Emacs Lisp (and Common Lisp) eschew all these syntactical tricks. They have dead simple syntaxes, and makes reading code clear and easy. You get constructs that are unambiguous and general, even though they're somewhat longer than Perly stuff like the above. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/