3 ms·
XML literals are now deprecated. Which is too bad, in my opinion, as HTML is mostly XML, too, and they are immensely useful for HTML templates in Scala.js envi
by atemerev 10y ago
XML literals are now deprecated.
Which is too bad, in my opinion, as HTML is mostly XML, too, and they are immensely useful for HTML templates in Scala.js environment (like React's JSX on steroids). Who'd have guessed.
I can only hope that thanks to the amazing work of Eugene Burmako, we'll have SQL literals, JSON literals, and whatever else, all properly typed, of course. Now _that_ would be something!
- saosebastiao 10y agoThis is my perspective as well. These things probably shouldn't exist at the language level, but with some thoughtful design, you don't need DSL grammar and type checking in the language. You still can have it in libraries or compiler plugins. The world would be better off, not worse off, having strong static reasoning and compiler enforced safety with the various DSLs we use on a daily basis: SQL, XML, Json, Protobuf, Regexp, etc., all the way down to things like Drools Rules, Datalog, Graphviz, Yacc.