[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] [wg2] in support of single-arity procedural syntax transformers

On Thu, May 12, 2011 at 5:50 PM, Andy Wingo <wingo@x> wrote:
> On Thu 12 May 2011 09:38, Alex Shinn <alexshinn@x> writes:
>> Yes, source info is a red herring - all of the SC and ER
>> systems I know retain source info.
> Even for bare identifiers, and other values that can't be put into weak
> eq? table, as I mentioned in an earlier mail?

I'm not sure what implementations do for this, but as has
been pointed out it's certainly possible.  Note in particular
that all systems use "identifiers", not bare symbols, and it's
possible to store additional info with the identifiers.

>> I'm still unclear by your motivation.
> I wish you would address my points instead of parody and questioning my
> motivation.

The parody was meant in friendly jest, and seemed the quickest
way to make my point - sorry if it came across otherwise.

The point is that the popular macro systems outside the
syntax-case family all do not and _cannot_ support raw
single-arity macro transformers.  They are fundamentally
incompatible.  The only known solution is to use wrappers,
which is why syntax-rules and the ER and SC family all
use wrappers.

If you want to insist on exposing the transformer signature,
then you're arguing that none of the other macro systems
are worth supporting, and no future innovation is worth
investigating.  Chicken et al. will simply be incompatible
and must rewrite their macro systems.  In order to make
this case, you need to 1) provide *much* stronger arguments
than slightly improving error messages and 2) the burden
of proof (that X is impossible to do with alternate macro
systems) is on you.

You said you weren't making such an extreme statement,
so I'm trying to understand what it is you do want so I can
answer better.  Arguing about little details tends to lose
sight of the big picture.

If you want to know how to write your macros with ER,
they are:

  (define-syntax id
     (lambda (x rename compare)

  (define-syntax else
     (lambda (x rename compare)
       (error "else referenced in invalid context"))))

If you just wanted to have a general discussion about
the relative merits of syntax-case versus other macro
systems, without the intention of forbidding those other
systems, then that's fine.  But unfortunately, as such a
discussion would have absolutely zero relevance for
the working group and because I'm so backed up with
things that *are* relevant, I really don't have time to
contribute :/


Scheme-reports mailing list