Where are the the comments in dmd?

Blatnik blatblatnik at gmail.com
Mon May 3 13:17:29 UTC 2021


On Monday, 3 May 2021 at 12:30:35 UTC, Ola Fosheim Grøstad wrote:
>> The lack of comments in dmd makes it extremely difficult for 
>> newcomers such as myself to contribute.
>
> I agree that the code structure is difficult to get into. The 
> code base should have been broken into more files and organized 
> properly in directories. The different layers should also have 
> been made completely separate.

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 get that it's probably nice to not have to type a lot in the 
import statements when you actually know what the all the files 
are after a year of hacking, but it's really hard to guess where 
something is.

Also, a lot of comments are rather useless.

```D
/*********************************
  * Loop data structure.
  */

struct loop { ... }
```

Really comment? I never would have guessed :P

```D
struct loc_t
{
     elem *e;
     int flags; // LFxxxxx
}
```

Ahhh that's what the flags are, I totally get it now. Thanks 
comment! :P

There's basically no way to know what something is for without 
doing a grep for it across the entire codebase..


More information about the Digitalmars-d mailing list