The purpose of a static language compiler is to help the programmer spot the 
bugs in the code very well and to compile it. It's not the job of a compiler to 
create nice HTML/XML documentation files.

So I suggest to:
1) DMD can copy all documentation strings inside the JSON file generated with 
the -X option. DMD has just to recognize the /** */ and /// inside the D code 
and put only such comments inside the JSON (the JSON has to contain all the 
information necessary to create the HTML pages).
2) Move the code that understands DDoc syntax and generates the HTML docs 
inside an external utility written in D or Python, and keep such utility inside 
the zip of the standard DMD distribution. This program can ask DMD to generate 
the JSON files, can read them and generate the HTML pages. 
3) Deprecate and then remove the -D option of DMD2.

Removing that HTML ddoc parsing & HTML generation from DMD allows such code to 
evolve faster and to be debugged more efficiently. Today some people are using 

[Mostly unrelated: once xfbuild is well debugged it can be added inside the zip 
of the standard DMD distribution.]

Bye,
bearophile

Reply via email to