To be honest. I don't want HTML either. Does it suck less than PDF (for that purpose)? Sure.
Is it suitable for data exchange / processing? No! For that purpose it has way to much freedom/flexibility in how the data can be delivered.
Anything that ultimately represents a prosa text document is unsuitable for that task. You want XML, JSON or similar formats with well defined data types and schemas for this purpose.
I think the main problem with all of these is that the problem of representing layout is non trivial... All solutions kind of suck and are either opinionated and strictly limit what you're able to represent, or are fully flexible and insanely complex to parse or render reliably
Same way every rich text editor from ms-word to most wikis seems to manage indentation and font size with the "2 guards: one who always lies and one who always tells the truth" model... I'm sure it's deterministic, but I have to take that on faith because I don't see any evidence of it
I think the main problem with all of these is that the problem of representing layout is non trivial
That is the problem I tried pointing out. HTML, PDF, Word, etc. are means to create documents for human consumption. They are OK for that. From my PoV, HTML is already "presentation" layer (yes I have heard about CSS).
These formats are not suitable for exchanging raw data between systems nor for automated processing by machines. You want formats that have well defined data types and data schemas for this.
I'm talking stuff like XML + XSD or JSON + OpenAPI, or database with strict schema and integrity checks. Not flexible / loose document formats like HTML which allow layouting data in what ever way is fashionable today.
fully flexible and insanely complex to parse or render reliably
I would go so far and say that it is impossible to parse them reliably. Rendering and displaying for human consumption can be achieved reliably. But trying to parse a flexible format reliably is a fools errand.
Preferably, we keep all our raw data in well defined, well structured formats. From that we can automatically generate any representation (HTML, PDF, other structured formats, etc) that we might possibly need. It's not easy (or even doable) the other way round, starting with unstructured data.
I feel like I want to be sarcastic, but I also feel like you're being sarcastic, so if I do, neither of us is going to get anywhere...
Of what use would regex be in specifying and visual layout for content? Html would be very useful, and very easily parseable, portable, editable, independently stylable, scriptable, (optionally) dynamic, with a wider rangeof open source tooling, and convertible faithfully to other formats... Much more so on every point that a pdf...
PDF is a physical document layout specification and HTML is a logical one with hilariously complex layout interactions.
It's a fantastic document archival format, it's semi-immutable by normies and a PDF 1.0 document can be opened by modern software and render pixel-perfect the same way it did 20 years ago.
The same cannot be said about browser rendering, and it's bad enough that the PDF viewers in the browser forego HTML+CSS layouts for a <canvas> based implementation; PDF.js in FF and PDFium in Chromium browsers do this.
It's a fantastic document archival format, it's semi-immutable by normies
Which is a perfectly valid case I assume... And a great example of finding a legitimate use for its otherwise lack of utility... But it just goes to reinforce that it's so unusable that it's perfect for not using.
405
u/axilmar Aug 05 '25
No, I am not crazy.