[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Syntactic sugar for regular expressions and URIs
From: |
Arto Bendiken |
Subject: |
Re: [Chicken-users] Syntactic sugar for regular expressions and URIs |
Date: |
Wed, 27 Jun 2007 16:47:27 +0200 |
On 6/27/07, John Cowan <address@hidden> wrote:
If you support Perl-style trailing letters, then you should be sure
to support "m" and "s" also.
Yes, that'd be useful. At present, though, I'm limited by the PCRE
options Chicken's `(regexp)' constructor exposes, and it only has 'i',
'x' and 'u'. I'll see about submitting a patch to the `regex' unit if
it looks like this can facilely be extended.
> Next, the `uri-literals' egg [3] allows facile use of URIs delimited
> by '<' and '>', a natural form already familiar from URL use in
> plain-text media:
I find this troubling, because although <...> are associated with URIs,
"#<...> has been associated for many years in the Lisp community
with non-rereadable syntax such as the "#<regex>" in your examples.
(Common Lisp actually makes this the default; "#<" signals an error.)
Loading this egg would cause "#<regex>" to be interpreted as a relative
URL. I think you should find some alternative syntax.
Yes, I expected this objection :-)
In the context of where I'm using these URI literals, there is no
danger of ambiguity, but in general use I concede that there could
well be.
That said, I did experiment with various alternative URI literal forms
but did not particularly fancy any that I could come up with. The
present one has proven to be most useful despite the overloading of
"#<". Better ideas are welcome, though - that's why I'm posting here.
--
Arto Bendiken | http://bendiken.net/