Hi, On Wed Jan 22, 2025 at 8:36 PM CET, Ingo Schwarze wrote: > onf wrote on Mon, Jan 20, 2025 at 11:13:57PM +0100: > > On Mon Jan 20, 2025 at 10:22 PM CET, Ingo Schwarze wrote: > >> [...] > >> Since this point keeps getting discussed, i'll briefly mention > >> that, when designing a markup language, permitting the inclusion > >> of chunks written in a different markup language is usually > >> terrible language design. > >> > >> The point of a markup language is to support a variety of output > >> formats [...] > > > That's not always true; HTML is a markup language too, after all, > > and it's very tightly integrated with the Web to the point of often > > not being easily convertible to other media. > > Actually, the *intention* of HTML officially still is supporting > various output media and seperation of content and presentation - > even though that is becoming harder over time due to the proliferation > of language features at the edges of the language.
I wouldn't say it's just at the edges. <div> and <span> have existed for a very long time now, and their only purpose seems to be to group stuff together to be styled. > You have a point that not all successful (in the sense of widely > used) markup languages actually reach this goal. That doesn't > mean the goal should be thrown overboard when starting to design > a new language. > > >> Designing your language such that authors can inline a different > >> language restricts your new language to essentially support only > >> that single output language that can be inlined, so it makes your > >> whole new language essentially pointless. [...] > > > There are many languages which were created to serve as an abstraction > > over a language deemed too complicated or unwieldy. > > I still claim that's almost always a bad idea with extremely few > exceptions. At least, the number of layers ought to be minimized, > or the ecosystem as a whole become a jungle that is hard to understand > for human beings. > [...] I didn't say I think such languages are necessarily good idea; I've merely noted that markup languages are often created for other purposes than to allow a wide variety of output formats, which you claim is their entire point/goal. > All the examples you name are terrible examples that should not exist. > > > See markdown, which was originally designed to simplify writing stuff > > on the web > > Absolutely a bad idea. Even though HTML has become a bit fat, > it's not so hard to learn that an abstraction would be needed on top > of it. In addition, the markdown language design is totally botched > for at least a dozen reasons - for details, see > https://undeadly.org/cgi?action=article&sid=20170304230520 . I know about the large number of edge cases that the original spec doesn't handle at all. Even with that, I consider pure markdown (i.e. without embedded HTML) a better language than HTML. > Besides, writing HTML and writing markdown syntax feel about the > same, I get what you mean, but there is certainly a difference between writing the two, about as big as between writing plaintext and HTML. > there is very little distance between the two abstraction > level, it's more like putting a bit of lipstick on the pig, > but it still remains easy to see it's essentially the same pig, > [...] If by the pig you mean HTML, I would say it's not the same once you don't embed HTML elements, because then the language becomes much more limited in scope and easier to translate to different output devices. It becomes its own language which can (if you resolve the edge cases) be easily converted to HTML, but also terminal output or roff. I disagree that creating markdown was a terrible idea. If anything was a terrible idea, it's post-HTML+ HTML. ~ onf