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

Re: benefits of SRE syntax

This page is part of the web mail archives of SRFI 115 from before July 7th, 2015. The new archives for SRFI 115 contain all messages, not just those from before July 7th, 2015.

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.                    cowan@xxxxxxxx
But then they don't really grind their gears, either;   
        they only obey the laws of physics.  --Unknown