<div dir="ltr"><div>But a block of text does not always turn into a single argument, so I'm not sure how to do what you ask.<br><br></div>Robby<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 9, 2013 at 7:05 PM, Matthew Butterick <span dir="ltr"><<a href="mailto:mb.list.acct@gmail.com" target="_blank">mb.list.acct@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Semantically, "an operation [in Scribble] doesn’t care whether it’s used with [...] or {...}." Therefore, it would be useful if Scribble expressions were not syntactically limited to the form @ ‹cmd› [ ‹datum›* ] { ‹text-body› }, and instead allowed text-mode and racket-mode arguments to be freely & indefinitely sequenced.<div>
<br></div><div>What I've found using Scribble is that many of the functions one writes are, of course, intended to operate on a text argument. So the text-mode argument naturally wants to come first in the function:</div>
<div><br></div><div>@cross-ref{This text}</div><div><br></div><div>Now, suppose I want to add an optional second argument. The natural place for this optional argument would be after the first:</div>
<div><br></div><div>@cross-ref{This text}["where.html"] </div><div><br></div><div>or</div><div><br></div><div>@cross-ref{This text){where.html}<br></div><div><br></div>
<div>But AFAIK, Scribble forbids these patterns. So I might try this:</div><div><br></div><div>@cross-ref["where.html"]{This text}</div><div><br></div><div>But that doesn't work either, because the cross-ref function expects the target text to be in the first position. So either I must forego idiomatic Scribble expressions altogether:</div>
<div><br></div><div>@(cross-ref "This text" "where.html") </div><div><br></div><div>Or use a keyword argument:</div><div><br></div><div>@cross-ref[#:destination "where.html"]{This text}</div>
<div><br></div><div>As a workaround, that's OK. But at this point, Scribble is reaching up into my code and starting to impose design restrictions (namely, keyword arguments) that have ripple effects elsewhere.</div>
</div>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>