No Recursively Nesting Data Formats

All these “semi-structured” formats, primarily SGML and its descenders XML and HTML, were initially intended for native language text markup. The mere fact people come up with other markup languages, such as ReST, BBcode, various wiki languages, Gemtext etc., clearly demonstrates one thing: HTML is a failure. These “angle-bracketed tags” are too bad even for the purpose they were intended: for native-language document formatting.

As of using XML for machine-readable data (which is not a native-language text), it is simply a nonsense, and for healthy-minded people it was clear from the very start. But healthy-minded people are a dying-out species nowadays, as clearly shown by the mere fact such an ugly beast as JSON appeared long after it became clear nothing like this has any right nor even a reason to exist.

So here's the rule: data formats with recursive nesting are forbidden.

Primarily this applies to text-based formats, namely SGML-based languages (XML and HTML) and JSON, but in case you encounter binary format defined to have recursive nesting, please remember it is in no way better.

NB: if you think you really need recursive nesting, it means you just don't realize something important. Look, there's theory of databases. It is a well-known fact that relational model is able to solve any database-related task. And the First Normal Form (1NF) — the simplest one among the nine known normal forms — is, simply speaking, just a requirement for all values (elements in any column of any row) to be atomic.

Someone might argue that “modern” database engines allow non-atomic data and even JSON; the answer here is that the modern IT industry is driven by irresponsible idiots who don't bother learning any theory, and, furthermore, never bother to think what they do.

Okay, there's one obvious exception from the rule, which we are forced to make — without it, we wouldn't be able to create any web sites, and, unfortunately, sometimes we have to do so. Recursively nesting data formats are allowed for interoperability with external software, provided that they are not used internally. So, our program can both analyse and compose data in such formats, but must never store its own data in these formats.

Well, templates and snippets used to compose HTML data should be stored as they are, but this is no violation of our rule: all these snippets and templates are just strings from which a larger text is composed.

The last thing to mention specially for devil's advocates: most of programming languages allow unlimited recursive nesting. Well, not for everything, e.g., you can't place one program inside another, and for statically-compiled languages, you shouldn't try to place one function or procedure inside another one, even if it is supported by the compiler. Anyway, at least arithmetic equations and control statements allow for (formally unlimited) nesting.

Well, programs are not data, they are programs. Bye.

By the way, MIME is recursively nesting, as you can put one MIME container into another. We have to analyse MIME-formatted stream in exactly one situation: for file-uploading webforms. We never generate anything like MIME containers, messages etc; in particular, if we send emails, they are in plain text. Actually, this is not the only (and even not the main) reason to ban everything related to MIME.