From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Reader macros Date: Fri, 23 Jan 2015 03:45:47 -0800 Message-ID: <54C2346B.4090800@dancol.org> References: <54C15ECA.5050008@dancol.org> <54C18A06.7090404@dancol.org> <87sif16duj.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GDNURMbgaQ0pE2eicO9OPFdV5n5xxWcak" X-Trace: ger.gmane.org 1422013565 6046 80.91.229.3 (23 Jan 2015 11:46:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2015 11:46:05 +0000 (UTC) Cc: Oleh , Stefan Monnier , emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 23 12:46:03 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 1YEcgc-0002O7-HI for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 12:46:02 +0100 Original-Received: from localhost ([::1]:58259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEcgc-0007sS-1x for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2015 06:46:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEcgX-0007sK-RR for emacs-devel@gnu.org; Fri, 23 Jan 2015 06:45:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEcgR-0000dE-JW for emacs-devel@gnu.org; Fri, 23 Jan 2015 06:45:57 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:39455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEcgR-0000d0-95; Fri, 23 Jan 2015 06:45:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=IkCAKSJSqlBryg/OvQhoh+h/qhsGaU7+BDhEeECjaaY=; b=JqbI0+4fBCJfdIOLfEJ44wWNxsVc1Rm7lXa/Ed5QQA2EE8BMMV+uxk3fyma5bjd+VL8W5W90K/cQBQs69u+Rjvc1xXxL3hygE8BVfbq6I+rWPvB/ieYApZRhwLW02rmLZk793Nu29nXiUp8tK0Rx//O5/tRTs/LfXh+kHSdWhwCYtNnKVON3bMF2yvQ+wY7d0HyaaxG14oZweOPSOdciLm4KmlKffjlDrEC3CKZ437cw4sQUUC31hkxfLWFoPVsCsPXs7w5tZlF0J4FpuRXheeGb21uOUlZLFcAr+JV3RIqHf39jBFa/W8BpmtnPhkNSxW62ywo8d1b/ayvTJNRLVA==; Original-Received: from [2601:8:b240:93::2b1] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1YEcgO-0002ee-Sg; Fri, 23 Jan 2015 03:45:48 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: <87sif16duj.fsf@fencepost.gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:181663 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GDNURMbgaQ0pE2eicO9OPFdV5n5xxWcak Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 01/23/2015 01:33 AM, David Kastrup wrote: > Daniel Colascione writes: >=20 >> On 01/22/2015 03:36 PM, Stefan Monnier wrote: >>> 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)) ) >> >> >> That's an excellent idea. >=20 > Doesn't work well where is an unmatched delimiter like ( or [.= So? The point isn't to support every conceivable syntax, but to cover the most common use cases without fundamentally changing the lexical structure of the source. Requiring #f() instead of #() is no great crime.= > Also would not work with #r"xxx" raw strings. Arguably a feature, not a bug. > I think it makes more > sense (like Guile does it) to make this kind of funcall not with = > but rather with . If indeed a sexp is wanted, calling `read' is > trivial. Sure, it's possible to do it that way, but then reader macros can break the lexical structure of the program. The only legitimate use case Stefan's idea doesn't cover is raw strings (and maybe here docs), for which I would be willing to add a special case to the reader if we decided we wanted them. --GDNURMbgaQ0pE2eicO9OPFdV5n5xxWcak Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJUwjRrAAoJEN4WImmbpWBl16AP/2BCvNMccKVfBKiq1tGtS9u2 8923L3woFXgwabFJs97TliWRcQUlJg7cISmgYO2Q73/Zub9XkM3qAcdA+e3SaIEx WCODS+CAVaCoBVsFBr+6JfEHDrCy7Z+mIuIZX3k09xD8zKnJ1pFeUP3RlrpuZA+0 pPk0T8Q07krNhxAivX4o0NXG9+DckKATQu+UQwBx3N23G/iSyiltZo8zDyhUi6Bj dd2cgDZSovuOtpi8vZ/aCT43x+EDR+ScXLdGPiN+kIFjRNQuHq0W/X6o5zDUCeMp RBV/tigsvypNWSzyBZK2aoxyaz2hSJ45QLmAbRVXbOf50MzhbobGIhM1I6mgR9Io 3qp4D4cHtgg8meiSys8PqSVC0K88Yncw1Bo4EMuUCjCWcoIdbQc3L2soo0dio7Eb wlzKNESxI8+lYGnuxuacfPX6MKgKu8qzdRXmH7Mc5Q9Sbnv/nTn+v2W97f+Lox60 /nAJ3I7BW2DYPcbP5bAdPaPEPd7oVqvnohLh4ofr0r8grCMzZCa+X09P08eAxyeg BzIfdkiYUAPb6ujsznDSu5U6yNQDOYnEkKYjXuHBQ0LStXZWvsmj25YJDG0uiGE5 ms9/vfj3iJt8ufukghJrOEyct49LxJhBs+7pkny6JNeY2whGZBu0Ct3AyQ7ho4EK RmxTtwd1+82plZu2a7GQ =1Te+ -----END PGP SIGNATURE----- --GDNURMbgaQ0pE2eicO9OPFdV5n5xxWcak--