[plt-dev] syntax-case error messages

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Tue Mar 30 09:40:12 EDT 2010

The docs for syntax-case say "If no clause matches, then the
exn:fail:syntax exception is raised." Okay I change this to "If no
clause matches, then the exn:fail:syntax exception is raised with a
generic error message indicating a syntax error in the most recently
invoked macro (via the @scheme[#f] argument to
@scheme[raise-syntax-error])."?

Robby

On Tue, Mar 30, 2010 at 7:12 AM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> On Mar 30, 2010, at 7:45 AM, Ryan Culpepper wrote:
>
>> Really? I read the first as the macro saying "No, you got it wrong. Read
>> the docs/source and figure it out." Not the most helpful error message,
>> maybe, but since macro interfaces are so much more free-form than procedure
>> interfaces, it's harder to say exactly what went wrong.
>>
>> The other error message, on the other hand, has very much an internal
>> error feel to it.
>
>
> Thank you for boiling it all down to such a short summary. Syntax -- like it
> or not -- has a radically different status than values. Most programmers who
> approach Racket will NOT have programmed in a world where syntax is just
> another library 'thing'. Instead they come from a world where parsing
> signals mistakes and when something from the inside of the parser spills
> out, it's a compiler bug.
>
> [Of course, it is a compiler bug for us, too, because macros are a compiler
> API. But we don't have to be blatant about it.]
>
> -- Matthias
>
>


Posted on the dev mailing list.