How can we make it easier to experiment with the compiler?

rikki cattermole rikki at cattermole.co.nz
Wed May 26 14:21:06 UTC 2021


On 27/05/2021 1:58 AM, Ola Fosheim Grostad wrote:
> On Wednesday, 26 May 2021 at 13:51:38 UTC, rikki cattermole wrote:
>> Fixing it, makes other issues much more visible to the point where 
>> they: HAVE TO BE FIXED RIGHT NOW.
>>
>> Without the rearranging to match concepts and complexities in the file 
>> structure, it is a lot harder to properly scope modules to doing one 
>> and only one thing.
> 
> Exactly. The core principle for anything that has to do with computers 
> at basically any level is surprisingly simple: Divide and Conquer.

I actually have an article on code quality and how I measure it.

https://cattermole.co.nz/article/code_qual

But the important list I use (for which dmd fails completely at):

1. Organized in a way that reflects the idea/concept.
2. Seperate concepts, seperate areas (files/areas of a file).
3. Grouping of resource usage
4. Depth from purpose
5. Naming

1, 2 and 4 is what this part of the thread is all about.

5 is stuff like what is STC? Variable names ext.

3. ok just look at the filename of this.
https://github.com/dlang/dmd/blob/master/src/dmd/libelf.d

or...

https://github.com/dlang/dmd/blob/master/src/dmd/libomf.d

I hope I don't need to say why these files fail that test when they are 
in the same directory as:

https://github.com/dlang/dmd/blob/master/src/dmd/doc.d


More information about the Digitalmars-d mailing list