Re: benefits of SRE syntax
John Cowan 20 Oct 2013 17:50 UTC
Per Bothner scripsit:
> If "structured regular expressions" are to be part of the language,
> we should think about how they apply to sequences (lists and vectors)
> in general, not just strings.
I agree with that, and I think it makes sense to have an API for matching
SREs against general vectors and/or lists. I don't believe, however,
that it should be integrated with this API. Scheme is almost entirely
a monomorphic language, except for the exact/inexact polymorphism of the
numeric procedures. (Of course, many procedures are either universally
polymorphic, like `cons`, or effectively universal, like `write`, which
is the union of a group of monomorphic procedures.)
Layering an object system on top of Scheme is a very reasonable thing
to do. Constructing Scheme on top of such an existing system, as Kawa
does, is also reasonable. Keeping the standard API monomorphic allows
either of these strategies or both at once.
--
Cash registers don't really add and subtract; John Cowan
they only grind their gears. xxxxxx@ccil.org
But then they don't really grind their gears, either;
they only obey the laws of physics. --Unknown