[plt-scheme] syntax-case pattern matching change

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Feb 27 17:09:02 EST 2008

At Wed, 27 Feb 2008 16:35:54 -0500, David Van Horn wrote:
> The semantics of syntax-case pattern matching for dotted patterns 
> changed going from 372 to 399.  The following example illustrates the 
> difference:
> 
> Welcome to MzScheme v372 [3m], Copyright (c) 2004-2007 PLT Scheme Inc.
>  > (syntax-case #'(a b c) ()
>      [(x ... . y) 'yes]
>      [_ 'no])
> no
> 
> Welcome to MzScheme v3.99.0.13 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
>  > (syntax-case #'(a b c) ()
>      [(x ... . y) 'yes]
>      [_ 'no])
> yes
> 
> I'm curious: why was this change made? 

 http://list.cs.brown.edu/pipermail/plt-scheme/2008-January/022527.html

>  (I actually prefer that latter 
> behavior, but it seems like a subtle change that could quietly break 
> some macros).

As you'll see, I predicted one or two broken macros.
Did you find one? :)

> Perhaps this deserves an entry in MzScheme_4.txt?

Good idea -- added.

Matthew



Posted on the users mailing list.