Hi, Andy Wingo <[email protected]> writes:
> On Sun 11 Jul 2010 09:48, Michael Lucy <[email protected]> writes: > >> On Thu, Jul 8, 2010 at 11:21 AM, Andy Wingo <[email protected]> wrote: >> >>> Humm, another thing to think about: (ice-9 regex) returns "match >>> structures", which are really just vectors; have a look at them, and if >>> it makes sense to mimic that interface, re-exporting those accessors >>> somehow, please do. >> >> So, three potential paths from here: >> 1. Mimic the match structure interface as much as possible. >> 2. Have a similar but differently-named "peg-match structure" >> interface that behaves mostly the same but has a few different >> functions (I think naming them something slightly different would lead >> to fewer people assuming they worked exactly the same as match >> structures). >> 3. Just having a different interface. >> >> I'm leaning toward (2); what do other people think? I'd probably: >> 1. Not have a peg-match:count function at all. >> 2. Not have the functions take submatch numbers. >> 3. Have peg-match:substring return the actual substring. >> 4. Have another function peg-match:parse-tree that returns the parse >> tree. > > Yes, if the needs are different, there's no sense in trying to horn the > present into the past's shoe. Take the good conventions from (ice-9 > match), but there is no strict need for compatibility. This should read (ice-9 regex), I think. Ludo’.
