On Sun, Sep 25, 2016 at 2:19 PM, Matthew Butterick <m...@mbtype.com> wrote: > > On Sep 25, 2016, at 2:10 AM, Eli Barzilay <e...@barzilay.org> wrote: >> *Don't* confuse scribble-the-documentation-system with the syntax -- >> the syntax is useful for many other cases, and designed to make sense >> in other cases. See my description (specifically section 4, which is >> very relevant here), and the scribble/text and scribble/html >> languages. > > To be fair, the documentation invites this kind of confusion. All the > material about the at-reader is within the Scribble docs. This makes > it look like it's dependent on Scribble, when really it's a separate > thing.
Yes, I know, and yes, it could very much use a restructuring. > In general, I think the word "Scribble" is misleadlingly overloaded > within Racket. IMO "Scribble" should refer only to the family of > languages that use the Scribble document model, including Racket > documentation. Well, it started with "scribble" being the name of the syntax, which came first. Then Matthew built the documentation system on top of it, and that was also named "scribble". When we realized that this is going to be confusing, it was already clear that the latter meaning is already "winning", so the syntax turned into @-forms, @-expressions etc -- I'm probably the only one who still uses the first meaning from time to time. And yes, that's not a good name since it can be customized too, but I don't see a good way out of it... > At some point the docs for "Scribble as a Preprocessor" were broken > out from the main Scribble docs — I'm guessing to emphasize that > they're conceptually separate from Scribble. But AFAICT what they > really have in common is the at-reader, not the document > model. Because they don't use the Scribble document model, I'm unclear > why they're called `scribble/text` and `scribble/html`. That also made more sense in the early days, since `scribble` was supposed to be the place for all scribble (the syntax) related things. > Meanwhile, I'd argue that the at-reader — itself an obsolete name, > since one can swap out the @ for any Unicode char — deserves to have > its documentation broken out into a separate top-level section, which > would more accurately reflect its status within Racket. At some point I intended to take the paper I wrote about it and make it into a separate documentation about the syntax, but I never got to actually do it. > + String splitting within {...} delimiters: I agree this is the right > default behavior, but it doesn't seem unreasonable to wish for > shorthand for when you really do want things concatenated into a > single argument, given that Racket is full of cognates like > let/let*, for/for*, list/list*, etc. That said, I don't have a good > idea what the notation would be. For plain single-string use, I always encouraged using `@string-append{...stuff...}`, but since this is horribly long, some simple shorthand like (define ~ string-append) can be used. For cases when you want to look at the result of some @-expression as a single value but not pay the huge price of accumulating intermediate strings, a plain old `list` does fine -- and that's what `scribble/text` is doing. With that, it's very useful not only to @list{...stuff...} but also to just quote it with '@{...} -- or the equivalent @'{...}, and, of course, everything that comes out of throwing @`{...} into the mix. > + I wish at-expressions could use multiple [...] and {...} parts, in > any order. Yeah, I considered it at some point, but decided to go with a more restricted (but maximally useful) syntax to avoid possible problems and maybe extended it later when needed. The idea of what we ended up with is that you can always tell where the @-expression ends by looking at the {}s, or putting them yourself to avoid getting things mixed up with the following text. -- ((x=>x(x))(x=>x(x))) Eli Barzilay: http://barzilay.org/ Maze is Life! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.