[plt-scheme] (v4) wildcard not allowed in expression
I believe the idea was that if someone writes an underscore in a macro
pattern it is a signal to the reader that this part of the pattern is
not looked at and that a little bit of language support would be a
Good Thing (tm) for this convention.
I believe that the change is at least mentioned in the mzscheme v4
change notes. (You may find other goodies there :).
Robby
On Mon, Jun 23, 2008 at 9:04 PM, YC <yinso.chen at gmail.com> wrote:
> Thanks Jos for the explanation.
>
> I do not grok how prohibiting a wildcard appearing in a template makes it
> useful. Is there a place that explains the rationale behind the change? I
> tried searching the docs but are not successful so far except for a short
> description of what you've said in
> http://docs.plt-scheme.org/reference/stx-patterns.html#(form._((lib._scheme/private/stxcase-scheme..ss)._......))
>
> Thanks,
> yc
>
> On Mon, Jun 23, 2008 at 6:47 PM, Jos Koot <jos.koot at telefonica.net> wrote:
>>
>> 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.
>> 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)
>> Jos
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>