On Sep  9, John Cowan wrote:
> Sam TH scripsit:
> 
> > Scribble would be vastly less useful if it wasn't used via `read'.
> 
> The purpose of "read" is to read S-expressions in the Scheme
> language.  Why can't mixed Scheme and Scribble be read through an
> implementation-specific (or even SRFI-based)
> "read-scheme-and-scribble" procedure?

The most important point about the design of the Scribble syntax (and
a central theme in my paper about it) is that it is read as
S-expressions.  So source code can contain @-forms which are read in
as S-expressions and are given meaning according to the usual Scheme
scope (functions, macros, imported definitions, etc).  For example,
you can write

  (let ([starred (lambda body (list "*" body "*"))])
    @html{Blah blah @starred{Some text here} blah.})

and the compiler sees that as plain Scheme code:

  (let ([starred (lambda body (list "*" body "*"))])
    (html "Blah blah " (starred "Some text here") " blah."))

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

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to