On Mon, Jan 30, 2023 at 03:59:52PM +0000, Adam D Ruppe via Digitalmars-d-learn wrote: > On Monday, 30 January 2023 at 15:37:56 UTC, Guillaume Piolat wrote: > > Why not XML? :) It has comments, you can use backslashes too. > > no kidding, xml is an underrated format.
XML is evil. Let me qualify that statement. XML, as specified by the XML spec, is pure evil. It has some absolutely nasty corners that has pathological behaviours like recursive expansion of entities (exploitable for DOS attacks or to induce OOM crashes in XML parsers), which includes token-pasting style pathology like C's preprocessor, and remote fetching of arbitrary network resources (which, no thanks to pathological entities, can be easily obfuscated). XML as used by casual users, however, is a not-bad format for markup text. It's far too verbose for my tastes, but for some applications it could be a good fit. As far as implementation is concerned, a (non-compliant) XML parser that implements the subset of XML employed for "normal" use, i.e., without the pathological bits, would be a good thing, e.g., Jonathan's dxml. A fully-compliant XML parser that includes the pathological bits, however, I wouldn't touch with a 10-foot pole. T -- Customer support: the art of getting your clients to pay for your own incompetence.