[racket-dev] Square-bracket-sensitive macros in Scribble sandboxes

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Nov 22 13:33:16 EST 2012

Two days ago, Neil Toronto wrote:
> (Probably. Why are we whispering?)

+1 to not using a macro that depends on paren shapes.  I'm not saying
that the brokenness is fine -- just that on one hand you're likely to
run into a bunch of problems with code that doesn't propagate the
shapes, and on the other hand there is so far no part of the core
language that depends on the paren shapes.

(The first is an inherent problem since you need other people's code
to deal correctly with a feature that you're using, and I think that
honu (especially the way it shapes up) is a much better solution

> Anyway, it occurred to me that I need to provide a more robust way
> to generate code for literal arrays anyway. Keywords are more easily
> preserved by macros than syntax properties:

Why not use vector syntax #(...) instead of [...]?

> I think that'll let me use Eli's sneaky eval:alts to display (array
> [0 1 2 3]) but evaluate (array (array-row 0 1 2 3)).

(That's not mine...)

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.