[plt-dev] syntax-case error messages

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Mar 30 08:56:28 EDT 2010

On Mon, Mar 29, 2010 at 6:33 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
> On Mar 29, 2010, at 7:18 PM, Jay McCarthy wrote:
>> I believe that you've thought about this more than me.
> I am not sure but I sure had a head-start on you. Plus it is my distinct impression that everyone who starts with Lisp-y languages goes through most of the learning process that the "Lisp community" has gone through. (It's kind of like in biology.) For the purpose of 'syntax discussions', I do count us all as Lispers.

"ontogeny recapitulates phylogeny"


> So here we go. Syntax should be as dynamic as possible for the implementor of language extensions and as static as possible for users. That's especially true for the majority of programmers who write no macros or only simplistic macros.
> What does this mean? When the average programmer uses the language and its syntactic libraries, there should be no distinction. When something goes wrong with the syntax, report it in terms of the 'what' of the syntax not in terms of how the macro failed. Just imagine you'd get syntax error message from your Java compiler in terms of the parsing technology used, not in terms of the grammar parsed. You'd never ever touch the language again. I think this applies to our syntax world too. That's what I mean with 'static'. Then again, I have recanted on my belief that 'static syntax' means no dynamics for the syntax implementor. I now do use three levels of files to implement my syntactic extension (mostly world) so that I do get single point of control and usable syntax for beginning students.
> (In the end it may all boil down to my POPL lecture: Errors Matter.)
>> Maybe I'm not arguing with Matthias. Maybe I am arguing with Jon. Jon
>> should not have said, "This macro application gives a bad error
>> message. Syntax-case: Grr!" He should have said, "This macro
>> application gives a bad error message. Macro: Grrr!"
> That's quite possible.

Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University

"The glory of God is Intelligence" - D&C 93

Posted on the dev mailing list.