News for hackers. Stuff that matters.
Re:Languages Which Almost Became CSS by smitherfield on Tuesday June 28, 2016 @01:27PM (#11995657)
Well, slower and then faster. Virtual selectors mean that CSS is now also Turing-complete (in a horrible, horrible way). And DSSSL would've been able to handle much or maybe even all of what's currently handled by Javascript.
Re:Languages Which Almost Became CSS by pcwalton on Tuesday June 28, 2016 @03:25PM (#11996729)
CSS is only Turing-complete in pathological cases. Pathological cases do not make a good basis for policy decisions. In reality, the loss in performance from losing the style sharing cache alone would probably swamp any gains you'd get from DSSSL.
Re:Languages Which Almost Became CSS by smitherfield on Wednesday June 29, 2016 @02:51PM (#12003757)
The point is virtual selectors and using Javascript for styling both have very poor performance characteristics, and both are A. ubiquitous and B. hacky kludges driven by the excessively limited nature of CSS as originally designed.

I'm probably out of my depth here, but what do you mean by the style sharing cache? I mean, any kind of file can be cached by the browser, including Javascript. And presumably browsers could've implemented optimizations (with or without the aid of hinting annotations) to identify those DSSSL functions that need only be evaluated once.

(BTW, like the author of the article seems to, I actually think that PSL looks like the best of the CSS alternatives he lists).

Re:Languages Which Almost Became CSS by sdegutis on Tuesday June 28, 2016 @02:02PM (#11995984)
> And DSSSL would've been able to handle much or maybe even all of what's currently handled by Javascript.

I severely doubt that. JavaScript can inspect attributes of anything on the entire page, run remote HTTP queries and inspect their attributes, and make styling decisions based on those, on the fly, and in response to user GUI events.

Granted, I'd probably be really okay with these features no longer existing. Just saying, I don't think any DSSSL could have taken them on.

Re:Languages Which Almost Became CSS by smitherfield on Tuesday June 28, 2016 @02:20PM (#11996149)
I should've been more clear — DSSSL might've been able, possibly in conjunction with later extensions (just as XJAX was not originally part of Javascript), to provide a similar end-user experience in many cases as CSS+Javascript currently does, albeit with very different semantics for the developer.

Not sure it would be better (it probably erred on the side of too much mixing of program logic and styling rather than too little), but it would certainly be different.