[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SRFI-88-style keywords

From: Julian Graham
Subject: SRFI-88-style keywords
Date: Fri, 2 Nov 2007 20:14:19 -0400

Hi Guilers,

I was looking at some SRFIs recently (specifically SRFIs 88, 89, and
90), and I noticed that Guile could support all three of them pretty
easily if the reader allowed self-quoting keywords in which the colon
comes at the end, a la SRFI-88.  The default reader behavior is to
only parse tokens as keywords if they begin with #: (e.g., #:foo), but
you can modify this behavior by setting the reader option (keywords
'prefix), which gets you keywords that start with just the colon
(e.g., :foo).  What if we added another reader option, say, (keywords
'postfix), which would recognize SRFI-88-style keywords?

I've attached a (slightly clumsy) patch against HEAD that adds this
functionality to read.c.  I know this is unsolicited, but I think it'd
be fairly useful in terms of compatibility.


Attachment: postfix-keywords.HEAD.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]