3 ms·
Something like that, yes, but attributes (a (@ (href /path))...) are ugly in particular. I think it shouldn't necessarily be parsable by Lisp. Attributes, for
by mojuba 19y ago
Something like that, yes, but attributes (a (@ (href /path))...) are ugly in particular.
I think it shouldn't necessarily be parsable by Lisp. Attributes, for example, could be as simple as
(a (href=/path) ...)
Why '=' - because this character is not used in attribute names historically, so with this syntax you can move from XML to Sexp smoothly, automatically that is. Formally, the syntax I suggested is not Lisp, of course.
- omouse 19y agoSomething like that, yes, but attributes (a (@ (href /path))...) are ugly in particular. So use :named attributes instead? (a :href "/path" ...)
- mojuba 19y agoNice indeed, but how about attribute names that themselves contain colons, or maybe start with a colon? XML/HTML is less restrictive in this regard: all that matters basically is spaces and '=' inside a tag.
- omouse 19y agoReplace the colon with a dash in your attribute names. Easy solution.