[racket] comments requested from users of SXML and PLT xexprs
6 minutes ago, Neil Van Dyke wrote:
> Thanks for your comments, Eli. I am still wavering on whether to do
> the permissive thing. And I am also looking at whether Typed Scheme
> and/or "html-template" make the permissiveness less useful than
> before.
Well, the problems that I ran into wouldn't have been different if
there was a type system around -- changing a function still means
changing call sites, etc.
[A little unrelated to this, I'm wonder whether you could use TR to
improve the error situation but (a) I suspect that it would be similar
to making a new `splice' struct that couldn't be added to an xexpr
without explicit conversion (and splicing), and (b) if it can be used,
then I suspect that the type errors that are involved would be hard to
decipher.]
> Permissiveness sure does make some things harder to implement and
> more computationally expensive.
Why is it harder? My experience so far is that the cost in terms of
implementation complexity is very minor.
> I was speaking of named and numeric character entity references in
> attribute values, which are supported in some versions of XML and
> HTML. "Composition" was a poor choice of term on the Racket email
> list.
>
> I'm not sure what you mean by "combining `style' attributes". Is
> that a transform rather than a representation/linguistic issue?
It's a different problem. Imagine that you define `bp' as (using
`scribble/html' terms):
(define (bp . body) (apply p style: "text-weight: bold;" body))
it works, but I'd like to be able to use it with:
(bp style: "color: blue;" "blah blah")
too. (And you can see how that goes... I could make `bp' pull out a
`style:' value and string-append it to the weight, but...)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!