Where are the the comments in dmd?
Dennis
dkorpel at gmail.com
Mon May 3 14:25:53 UTC 2021
On Monday, 3 May 2021 at 13:17:29 UTC, Blatnik wrote:
> Honestly another difficult thing to get is the file names
> themselves.
>
> `ty.d`, `ph2.d`, `mars.d`, `melf.d`, `fp.d`, `ee.d`, `e2ir.d`,
> `eh.d`, `el.d`, I could go on and on hahaha.
I think this stems from Walter Bright making C/C++ compilers
since the 80s.
In the MS DOS days the [8.3
filename](https://en.wikipedia.org/wiki/8.3_filename) was the
norm, so you could not name `eh.c` `exceptionhandling.c` or
`exception.c` even if you wanted to.
You can see the meaning of each file here:
https://github.com/dlang/dmd/tree/master/src/dmd#dmd-source-code
> ```D
> struct loc_t
> {
> elem *e;
> int flags; // LFxxxxx
> }
> ```
>
> Ahhh that's what the flags are, I totally get it now. Thanks
> comment! :P
Another archaism: C doesn't have proper enum types, so the
comment says the flags are defined by the macros prefixed with
`LF`.
Of course your point still stands that dmd is not commented well
and not easy for new contributors get into, but a lot of the
ugliness is there because of historic reasons.
More information about the Digitalmars-d
mailing list