<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>Correct. _ has become a wild-card that is
bound to a syntax that does not want to be called. You can no longer use _ like
other symbols. Hence the wild card may appear in a pattern, but you should not
use it in a template. That is in R6RS or PLT 4. In 371 _ was just a symbol like
any other one. Why in Pretty Big it still works as an ordinary symbol in old
fashion, I don't know.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>If you want a symbol that is associated
with the name of the syntax use anything else than a wild-card. The wild-card is
not bound to a pattern element (except may be in Pretty Big, I don't
know)</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=yinso.chen@gmail.com href="mailto:yinso.chen@gmail.com">YC</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jos.koot@telefonica.net
href="mailto:jos.koot@telefonica.net">Jos Koot</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu">pltscheme</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, June 24, 2008 3:31
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [plt-scheme] (v4) wildcard
not allowed in expression</DIV>
<DIV><BR></DIV>I used to write _ in the expression as a shorthand to the head
of the pattern as follows:<BR><BR>
<DIV style="MARGIN-LEFT: 40px; FONT-FAMILY: courier new,monospace">Welcome to
DrScheme, version 371 [3m].<BR>Language: Pretty Big (includes MrEd and
Advanced Student).<BR>> (define-syntax (and2 stx)<BR> (syntax-case
stx () <BR> ((_ a b c d ...)<BR>
#'(_ a (_ b c d ...))) ;;; works <BR> ((_ a
b)<BR> #'(if a b #f))))<BR>> (and2 #t #t
#t)<BR>#t<BR>> (and2 #t #t #t #f)<BR>#f<BR></DIV><BR>In v4 - the above
causes the error of "<SPAN style="FONT-FAMILY: courier new,monospace">_:
wildcard not allowed as an expression in (_ #t (_ #t #f))</SPAN>".
I noticed this error using emacs & v4 on Linux. <BR><BR>I tried to
replicate it using DrScheme (on Windows) and found that with the Module
language it will cause the same error, but if using legacy language of Pretty
Big, it appears to be behave the same as in 37x. <BR><BR><BR>
<DIV style="MARGIN-LEFT: 40px; FONT-FAMILY: courier new,monospace">Welcome to
DrScheme, version 4.0 [3m].<BR>Language: Module; memory limit: 128
megabytes.<BR>> (and2 #t #t #f) ;; throw error <BR>. _: wildcard not
allowed as an expression in: (_ #t (_ #t #f))<BR></DIV><BR>
<DIV style="MARGIN-LEFT: 40px; FONT-FAMILY: courier new,monospace">Welcome to
DrScheme, version 4.0 [3m].<BR>Language: Pretty Big (includes MrEd and
Advanced Student); memory limit: 128 megabytes.<BR>> (and #t #t #f) ;;
works<BR>#f<BR></DIV><BR><BR><BR>
<DIV class=gmail_quote>On Mon, Jun 23, 2008 at 5:44 PM, Jos Koot <<A
href="mailto:jos.koot@telefonica.net"
target=_blank>jos.koot@telefonica.net</A>> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV bgcolor="#ffffff">
<DIV><FONT face="Courier New" size=2>May be you missed the fact that _ has
become a wild-card.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV>
<DIV>
<DIV></DIV>
<DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">-----
Original Message ----- </DIV>
<DIV
style="BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B>
<A title=jos.koot@telefonica.net href="mailto:jos.koot@telefonica.net"
target=_blank>Jos Koot</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>To:</B>
<A title=yinso.chen@gmail.com href="mailto:yinso.chen@gmail.com"
target=_blank>YC</A> ; <A title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu" target=_blank>pltscheme</A>
</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B>
Tuesday, June 24, 2008 2:39 AM</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B>
Re: [plt-scheme] (v4) wildcard not allowed in expression</DIV>
<DIV><BR></DIV>
<DIV><FONT face="Courier New" size=2>It works for me though:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>#lang scheme</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2>(define-syntax
x<BR> (syntax-rules ()<BR> ((_ 1 _) 'one)<BR> ((_ _ 2)
'two)))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2>(x 1 monkey) ; one<BR>(x monkey 2) ;
two</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Welcome to DrScheme, version
4.0.0.1-svn16jun2008 [3m].<BR>Language: Module.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">-----
Original Message ----- </DIV>
<DIV
style="BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B>
<A title=yinso.chen@gmail.com href="mailto:yinso.chen@gmail.com"
target=_blank>YC</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>To:</B>
<A title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu" target=_blank>pltscheme</A>
</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B>
Tuesday, June 24, 2008 12:32 AM</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B>
[plt-scheme] (v4) wildcard not allowed in expression</DIV>
<DIV><BR></DIV>Hi - <BR><BR>It seems that in v4 `_` can no longer exist
in the expression position for syntax-case, is there a reason for the
change? <BR><BR>Thanks,<BR>yc<BR><BR>
<P></P>
<HR>
<P></P>_________________________________________________<BR> For
list-related administrative tasks:<BR> <A
href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme"
target=_blank>http://list.cs.brown.edu/mailman/listinfo/plt-scheme</A><BR></BLOCKQUOTE>
<P></P>
<HR>
<P></P>_________________________________________________<BR> For
list-related administrative tasks:<BR> <A
href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme"
target=_blank>http://list.cs.brown.edu/mailman/listinfo/plt-scheme</A><BR></BLOCKQUOTE></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>