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

Re: proposals for R5RS (sorry)

> PROPOSAL 1:  An escape syntax for templates.

> Add the production

>     <template>  -->  (::: <template>)

> If a <template> of the form (::: <template>) occurs as a subtemplate
> on the right side of a <syntax rule>, then all ellipses that occur
> within the <template>, and all occurrences of the ::: symbol itself,
> will be transcribed as if they were ordinary identifiers.  This
> allows a macro to expand into expressions that contain ellipses, or
> ellipses escaped by the ::: symbol.  Pattern variables that occur
> within the <template> will still be expanded.

This is a nice generalization of the (... ...) escape that we proposed
in "Syntactic Abstraction in Scheme".  Is there some reason why you
chose ::: rather than ...?  I chose ... in order not to take away one
more identifer from the pattern variable namespace.  I am happy with
this change if you are willing to go with ..., unless you can convince
me that using some other identifier is necessary.

> PROPOSAL 2:  Vectors as patterns.

> Add the productions:

>     <pattern>   -->  #(<pattern>*)
>                   |  #(<pattern>* <pattern> <ellipsis>)
>     <template>  -->  #(<template element>*)

> Delete the production:

>     <pattern datum>  -->  <vector>

I agree with this change.  I would at least like to see <vector>
removed from <pattern datum>, since it precludes implementations from
handling vectors in this way.