Bug 1427 – Generated .di files look ugly and are hard to read
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-08-17T16:13:43Z
Last change time
2019-07-13T11:43:59Z
Keywords
patch
Assigned to
No Owner
Creator
Bill Baxter
Comments
Comment #0 by wbaxter — 2007-08-17T16:13:43Z
Header files can be a good source of documentation for competent programmers. By stripping out all the implementation cruft, a header file gives you a concise summary of all the types and functions a module provides in a format that is easy to navigate and search with a simple text editor. HTML Docs provide a concise summary too, but require firing up a browser and since we are programmers who spend the majority of our time writing code, it's usually easier to just open up a header file than dig through a bunch of web pages.
So the point of all this is to say that .di files should be generated with a human reader in mind. Currently the generated files throw away almost all formatting, which makes them very hard for a human to read.
There's no reason why the di generator can not also be a source beautifier at the same time, generating source code with even more consistent indentation and formatting than the original code.