[racket] Making a section optional in Scribble

From: Matthew Butterick (mb at mbtype.com)
Date: Fri Dec 26 22:37:03 EST 2014

> On Tue, Dec 23, 2014 at 11:20 AM, Eli Barzilay <eli at barzilay.org> wrote:

> On Wed, Dec 17, 2014 at 1:55 PM, Matthew Butterick <mb at mbtype.com> wrote:
> > The "listification" of arguments within curly braces is easily the
> > aspect of Scribble syntax that trips me up the most. I understand why
> > it's done that way. But for my purposes, I usually want the thing
> > between curly braces to behave as a block, not as a list.
> (I think that you mean the other way -- you prefer that it does return a
> list with all of the string expressions instead of silently dropping
> them all except for the last one...)

Sorry, when I said "block", maybe I inadvertently suggested a `begin`-style
block. What I meant is that many contexts, I end up wanting the material
between curly braces to be resolved into a single string argument, with
nested expressions evaluated first, not unlike the way `format` works. IOW,
I don't want a list at all.

Anyhow, this isn't even a quibble, much less a complaint. Just an
observation that there's at least one other useful way to parse the
contents of a Scribble text body.

(BTW, in one of the last experiments I had with the syntax, I made
> @foo{bar} read as something like (dispatch foo ("bar")) with the idea of
> allowing people to define a specific `dispatch' macro that does whatever
> you want.  But I eventually concluded that having such "hidden
> identifiers" pop up as a result of reading stuff is not a good idea.)

As a Scribble artiste, I like that idea. But rather than attach a
dispatcher to the default curly braces, perhaps you could permit custom
dispatchers to be invoked by custom delimiters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141226/43082e70/attachment-0001.html>

Posted on the users mailing list.