[Scheme-reports] editorial awkwardness for syntax-rules pattern-matching Per Bothner (03 Sep 2014 20:48 UTC)

[Scheme-reports] editorial awkwardness for syntax-rules pattern-matching Per Bothner 03 Sep 2014 20:43 UTC

If there is a revision or successor to r7rs, I suggest changing the really
awkward specification of syntax-rules pattern-matching with ellipsis in 4.3.2:

For example:

   P is of the form (P_1 . . . P_k P_e ellipsis P_m+1 ... P_n)
   where E is a proper list of n elements, the first
   k of which match P_1 through P_k , respectively, whose
   next m−k elements each match P_e, whose remaining
   n−m elements match P_m+1 through P_n

The phrase 'of the form (P_1 ... P_k P_e ellipsis P_m+1 ...  P_n)'
doesn't really make sense since m and n come out of nowhere.

Much clearer to write:

   P is of the form (P_1 . . . P_k P_e ellipsis P_k+1 ... P_k+l)
   where E is a proper list of n elements, the first
   k of which match P_1 through P_k , respectively, whose
   next n−k-l elements each match P_e, whose remaining
   l elements match P_k+1 through P_k+l

Similarly for other items.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports