[racket] Making a section optional in Scribble

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Dec 28 18:51:58 EST 2014

On Sat, Dec 27, 2014 at 5:37 AM, Matthew Butterick <mb at mbtype.com> wrote:
>>
> On Tue, Dec 23, 2014 at 11:20 AM, Eli Barzilay <eli at barzilay.org> wrote:
>>
>> (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.

Well, with the current system you need to write it yourself, as in

    ... blah ... @dispatch{...} ... blah ...

or more likely some shorter name if you want to use it everywhere...  IOW, you
write the dispatcher name yourself, and use the usual tools to make it
convenient,
which I think is overall more rackety-ish.

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

Posted on the users mailing list.