|
|
|
|
|
by hackrmn
21 days ago
|
|
I looked at CSTML, and frankly, it looks like any other improvement that upon first glance may seem like definite improvement, but the trouble with these dialects or ideas is that it's not the format that's hard to incorporate -- even after you prove it is sound (undesirable parsing ambiguities can something show themselves _after_ you wrote a parser to verify the language grammar etc), but pushing for adoption is. XML didn't die only because it was verbose, it died because the people who may have been convinced of some of the featured really disliked by everyone else, refused to budge -- perhaps they thought that repeating the tag's name is a good thing because it forces one to be diligent or whatever * points to some research paper that supposedly proves repeating text improves accuracy *. It's the equivalent of doubling down when opposed. So XML basically became more XML the more criticism piled up, and as it ossified it died. CSTML, as likely much of anything else that aims at replacing SGML/XML/HTML, is like projects -- ideas are cheap, going through with it is hard. Before CSTML is a long path of adoption, and today with HTML 5, it's even more narrow unless Google, for one, suddenly decides it's the best thing since `<parsed-bread>` (closing tag is omissable). I think some straightforward YAML schema for representing HTML 5, may have more traction because both are existing languages so not much extra tooling would be required. I could for instance write my Web blog in YAML that is unambigously and simply compiled into HTML 5 (without sacrificing a _single feature_ of the latter), so I don't have to actually type HTML (5). Not everyone uses React or JSX or what have you, and Markdown implementations in practice are often lacking for truly rich blog articles. Then again, if you have a blog article with interactice diagrams, sliders and ad-hoc questionnaires, _XML_ (or a YAML representation thereof, for much the same reason as outlined earlier) _is_ IMO a good language _in form_ -- I have used XSLT with good effect to just stick to a domain-specific language for my blog articles, and have a single XSL stylesheet render uniform HTML page linked to a CSS stylesheet that was basically a posterchild for the coveted content-presentation separation in practice. |
|
Also completely with you on wanting a language I can use to losslessly write HTML, and CSTML does that too. That docs page on CSTML is written in CSTML for example: https://github.com/bablr-lang/bablr-docs/blob/trunk/src/cont...
I also think the path to adoption for CSTML is eased considerably by the fact that most CSTML documents will be produced as parser or WYSIWYG editor output rather than hand-written. And yeah, the whole world of XSLT opens back up again with this tech. I loved the idea behind XSLT. It was a great idea. It created a much richer semantic internet, and then let visual presentation be a concern purely secondary to semantics.