From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Clojure-like syntactic sugar for an anonymous function literal Date: Fri, 23 Jan 2015 11:47:15 +0100 Message-ID: References: <54C15ECA.5050008@dancol.org> <87egqlvl86.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1422010042 12099 80.91.229.3 (23 Jan 2015 10:47:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 10:47:22 +0000 (UTC) Cc: Daniel Colascione , Stefan Monnier , emacs-devel@gnu.org To: Phillip Lord Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 23 11:47:21 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 1YEblo-00044j-UZ for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 11:47:21 +0100 Original-Received: from localhost ([::1]:58103 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEblo-0007V1-A9 for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 05:47:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45425) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEblk-0007Uw-Vv for emacs-devel@gnu.org; Fri, 23 Jan 2015 05:47:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEblk-00076l-4U for emacs-devel@gnu.org; Fri, 23 Jan 2015 05:47:16 -0500 Original-Received: from mail-we0-x235.google.com ([2a00:1450:400c:c03::235]:47111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEblj-00076e-UT for emacs-devel@gnu.org; Fri, 23 Jan 2015 05:47:16 -0500 Original-Received: by mail-we0-f181.google.com with SMTP id k48so5105543wev.12 for ; Fri, 23 Jan 2015 02:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8dYRHpJ8JEQkwKd4s/Xd6xge2nVO+WorAElc+yNXOgI=; b=okkJDOQepUp/gNyhKAUgqPyX+W2PxFu2X8HNdhjzpsBJOFCWX61Ntdgxvs1BGSvfUa Bnjcm5oqKJspTqh7FOUErpDKD+30scTjQtdwFX+fLWW9NkMGn2dNG2lB3V5tGpt2kw/r QLbXBpvNIZ4q/pEalLzU2oVty9grqIGvUC6XYtdHlrzrg36L7owLk1bAHsaWi9RAfKFE Js3gv5zf5dP6YN+AUuhdznC978p2gay6LefbajsXq4aCWhiA29hrpk6vK+pj/nIPbUzX B5SlpJ8MCQCSBJtSp3/1vprj0slvdhV4lQIdY9mzwZANW89vNIZ1CaQBGc0hxHSCz97e sXHw== X-Received: by 10.180.37.197 with SMTP id a5mr2523553wik.2.1422010035320; Fri, 23 Jan 2015 02:47:15 -0800 (PST) Original-Received: by 10.27.137.137 with HTTP; Fri, 23 Jan 2015 02:47:15 -0800 (PST) In-Reply-To: <87egqlvl86.fsf@newcastle.ac.uk> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::235 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:181660 Archived-At: >> Maybe we could introduce a more limited form of reader macros. >> E.g. allow # and make the reader return >> >> (funcall (cdr (assq reader-macro-alist)) ) > > Would it not be possible to have the reader return a macro which could > do the cdr and assq at compile time and obviate the need for funcall? > This would be faster. It means that changes to reader-macro-alist > wouldn't be reflected in code till it was re-evaled. > > My main concern with this as a proposal is that is a fairly > small namespace. There is a lot of possibility for pretty disasterous > clashes if this gets used in the wild. How about this: #a(...) is (reader-macro-a ...) #b(...) is (reader-macro-b ...) ... #z(...) is (reader-macro-z ...) This would be easy to implement, since this is just an extension of the `backquote' and `short-lambda' method to 26 reader macros. The core could take over some of them, and leave the rest open to the public.