4 ms·
Could you give an example of how such a Lisp-like syntax would look, to show the improvement?
by mbrock 10y ago
Could you give an example of how such a Lisp-like syntax would look, to show the improvement?
- tannhaeuser 10y agoNot the one you asked, and purely for historic reasons, but DSSSL, the precursor of XSLT and CSS, was Scheme: ; rule associated to document's element class (element (section header) (make paragraph font-family-name: "Helvetica" font-weight: 'bold font-posture: 'oblique (process-children) ) ) ; rule associated to a particular element uniquely identified with an id: (id ("ref34") (make paragraph font-family-name: "Helvetica" font-weight: 'bold font-posture: 'oblique (process-children) ) ) [1]: http://dsssl.netfolder.com/DSSSL-markup-Rules.htm http://dsssl.netfolder.com/DSSSL-markup-Rules.htm
- usaphp 10y agoAnd how is that making it better than CSS? It looks more complicated and still has to use all the same attributes.
- tannhaeuser 10y agoI don't advocate using it, I just posted it for historical reference (actually I'm hesitating to post anything LISP here because that will easily derail a thread into becoming off-topic). But what the snippet shows is how eg. the DOM is traversed explicitly, as opposed to CSS's multiple implicit measurement and layout passes over the DOM. CSS sure is more compact, but doesn't begin to reveal anything like the above snippet.
- kazinator 10y agoFor one thing, if the rest of the representation of the document (the HTML and script part) was in the same language, maybe the CSS could be condensed with macros, or otherwise procedurally generated on the client side, all in the same syntax.
- kazinator 10y agoFigures Schemers would put the colon on the wrong end just so that the property indicators wouldn't translate to Lisp keyword symbols.