That’s not my concern. My concern is about the behavior of
HTML objects once they are constructed. What operations are valid on them, etc. For example, the constructor doesn’t recognize even its own type. For strings, nesting of strings in the constructor has relatively intuitive behavior…
julia> string("X", " ", string("Y"))
I’m not sure why
HTML behaves this way, but it’s not parallel (the source for the construct shows it’s not self-aware), as the constructor for the
string type is.
julia> display("text/html", HTML("X", " ", HTML("Y")))
My guess is that this type was declared in a moment, but never really explored and developed. If we want interoperability among tools that construct HTML, then we should probably provide reasonable semantics for HTML objects. As Julia becomes more used outside of core number crunching for web application development (or even notebooks, like
Pluto.jl), working smartly with hypertext data seems important.
Importantly, what is the stomach and path to providing better semantics for HTML data type? Or, given how undeveloped it is, should it even be part of the core system? I mean,
HTML is active with no other action when I start Julia… it’s a built-in. Not using it when rendering to HTML seems anti-social, yet, as noted, even basic operations simply don’t work as you’d expect.