Re: R6RS versus the pattern operators
Adam Nelson 17 Aug 2020 14:38 UTC
+1 for the regex-style * and + matchers, that seems more understandable
and portable. Isn't = already used for something else in `match`, though?
On 8/17/20 9:52 AM, Lassi Kortela wrote:
>> The user can either pick ..1 and be incompatible with R6RS, or pick
>> __1 and be incompatible with other WCS implementations. It will
>> probably be easier to fix other WCS implementations than R6RS.
>
> Since `...` and `..1` and `..=` are analogous to the regexp matchers
> `*`, `+` and `=` would it work to use those one-character identifiers?
> Those have got to be permitted in all Scheme implementations since
> they are needed for standard number procedures.
>
> In SRFI 204 there's one more:
>
> ..* k j between k and j matches, where k and j are integers.
>
> But that seems like a new invention in the SRFI? It's not in the Chibi
> match manual at
> <http://snow-fort.org/s/gmail.com/alexshinn/chibi/match/0.9.0/index.html>.
>
> The identifier `...` is nice since it's already used in syntax-rules,
> but if `...` is not portable it could have `*` as an alias.