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

Re: "rx"

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.



On Wed, Oct 16, 2013 at 7:48 AM, Evan Hanson <evhan@xxxxxxxxxxxxxxx> wrote:
The shift from "regexp" to "rx" partway through the API feels clumsy. To
me, it signals a difference in meaning where AFAICT there isn't one.

This is in fact very deliberate, because these functions
are acting on a different data type.

I'm not too happy with the names myself though, but
couldn't think of anything better.  I'm open to other input.

IMHO, the `rx-match` record type should rather be called "regexp-match",
or simply "match". This would align the rx-* procedures with the rest of
the API in clarity of names. (I recognize the collision on
`regexp-match?`, but that procedure could instead be called
"regexp-occurs?" or somesuch, which I'd argue is more descriptive
anyway.)

Well, regexp-occurs? would imply a search, but regexp-match? is
matching the whole string.

(Sorry for what some might consider bikeshedding, but I do think good
names matter.)

Bikeshedding is fine, we might as well get it out of the
way now.

-- 
Alex