From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal Date: Wed, 21 Jan 2015 21:36:39 -0200 Message-ID: References: <765b55dfa6d6df976352fc7c50b15c6f@samertm.com> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1421883409 27774 80.91.229.3 (21 Jan 2015 23:36:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 Jan 2015 23:36:49 +0000 (UTC) Cc: emacs-devel To: Oleh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 22 00:36:49 2015 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 1YE4pK-0000fn-Kh for ged-emacs-devel@m.gmane.org; Thu, 22 Jan 2015 00:36:46 +0100 Original-Received: from localhost ([::1]:50580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YE4pJ-0007Vz-V7 for ged-emacs-devel@m.gmane.org; Wed, 21 Jan 2015 18:36:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YE4pE-0007Vt-SN for emacs-devel@gnu.org; Wed, 21 Jan 2015 18:36:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YE4pE-00065A-27 for emacs-devel@gnu.org; Wed, 21 Jan 2015 18:36:40 -0500 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:37488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YE4pD-00064z-Sl for emacs-devel@gnu.org; Wed, 21 Jan 2015 18:36:39 -0500 Original-Received: by mail-oi0-f43.google.com with SMTP id z81so11926518oif.2 for ; Wed, 21 Jan 2015 15:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=SE9RdE3HhuDEKHMc6Cn6Kr1XnW821pwfQuTVypbrkZg=; b=c2G+s3HV0Zp+PCQhhkytkb2lVfDCps1AdiyUJ7UhMXRN8d6oaVTQCTknba1yBNjgNL un7eMrESj2AA4oaf6X2QoGTwHFIOAcW91LfHmRiqjnPW1p6+4vaVzFnAAisL4yOloCFQ rlfcN+RPTv1bvfbwdcOCHkp/AQ7EJfetxDqOlaarQJvdvKGQ1gOcq5se1YEmE06O3nQ3 NTQG1QSA/v5Vli1BTIeoirHPEtd6ES+9yECAcrKd0Kud82TZMGsbmdDdBng9f8f7zW2G VlTh1EOGVpdWpddUVhLrHad7pfWDC11yUt18u6r2D2H3rcAYKMB6z4lOWFiNiN8lHmGE hQCQ== X-Received: by 10.202.171.69 with SMTP id u66mr6115300oie.27.1421883399452; Wed, 21 Jan 2015 15:36:39 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Wed, 21 Jan 2015 15:36:39 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: eOE3v-sbGVIDe0uGmObLDEgvKe8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::22b 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:181538 Archived-At: Firstly, I'd like to manifest my support for this feature. Secondly, (even though this patch is obviously not complete, since it still needs the actual macro) before it's done, don't forget to add a ChangeLog entry with the commit. Thirdly, you have a small typo in the commit message: "in[dt]ent". 2015-01-21 20:37 GMT-02:00 Oleh : > Thanks for the input, > >> Some parts of short-lambda's documentation is unclear to me. I have no >> experience with Clojure, so this is all from the perspective of someone new >> to short-lambda. >> >>> 2. In the case when `%1' is the highest-ranking argument, it may be >>> abbreviated to `%'. >> >> >> When '%1' is the highest-ranking argument, that means '%1' is the only >> argument, correct? I think this point will be more accessible if we don't >> rely on the reader knowing or correctly inferring what "highest-ranking" >> means, and use something along the lines of "when %1 is the only argument" >> instead. > > Fixed with your suggestion. The point is not to mix % and e.g. %2. > Clojure allows this, for not particular reason. > >>> 3. The lower-ranking arguments are auto-added, even if they are not >>> present in FORMS. >> >> >> Auto-added to the list of arguments? Similar to my above point, it will be >> better if we can remove the dependency on "lower-ranking", and explain what >> we mean by that term (something like "all arguments with a smaller number >> than the argument with the largest number are included as part of the >> lambda's arguments, even if they do not appear in STRUCTURE"). > > This means: > > (short-lambda (list %3)) => (lambda (%1 %2 %3) (list %3)) > > > Oleh >