Wed Oct 17 - Avoiding Code Smells by Walter Bright

Walter Bright newshound2 at digitalmars.com
Wed Oct 31 04:54:02 UTC 2018


On 10/30/2018 5:50 PM, Stanislav Blinov wrote:
>> As for encapsulating globals in a struct, I don't like it...
> That's something one has to rigorously audit at all times. Grouping of globals 
> is something that just *must* be done, but first and foremost having in mind 
> access locality. The last thing you want to do is sacrifice cache just for that 
> one occasional read or write (*cough* errno *cough*...)

Grouping them together is the first step towards getting control of them. A lot 
of my older code has random globals scattered throughout. Fixing that is a slow 
process:

   https://github.com/dlang/dmd/pull/8892

That's just for one.


More information about the Digitalmars-d mailing list