Feedback on Átila's Vision for D

Nicholas Wilson iamthewilsonator at
Sat Oct 19 17:27:26 UTC 2019

On Saturday, 19 October 2019 at 13:45:37 UTC, Aliak wrote:
> On Saturday, 19 October 2019 at 12:23:36 UTC, Nicholas Wilson 
> wrote:
>> IME, no. If your module is big enough that you can't keep all 
>> of it in you head and you start calling implementation details 
>> of your classes _by accident_ then either:
>> a) name your implementation details so they stand out so you 
>> don't call by accident (e.g. a._something() )
>> b) split up your module into a package so that it fits in your 
>> head, this will (probably) cause you to not be able to call 
>> the implementation details at all, and will thus cause you to 
>> have to think about the organisation of you package (which is 
>> probably a good thing).
> Solution a is a convention.


> And solution b is fluffy.

How so? Also, you should probably be doing that anyway for 
different reasons.

> Neither are enforceable. But they are indeed things you can do 
> to try and mitigate things. And it becomes exponentially harder 
> to enforce conventional practices the bigger the code base. 
> Unfortunately that’s only something you get to realize after 
> enough experience in big code bases and in larger teams.

Maybe, but this is a O(individual file size) problem not a O(code 
base) problem,
which is why b is such an effective solution.

Since I don't expect to convince you of anything further, the 
only thing I can suggest is to write a lint rule using the 
compiler as a library (or hack the compiler yourself), since 
changing the behaviour would almost certainly be rejected on cost 
(i.e. breaking stuff) / benefit, and adding a second private 
would probably also be rejected as too narrow a feature for 
marginal, at best, utility.

I can't remember if you do compiler stuff, but I'd be happy to 
help once I have some time (or try slack for faster response from 

More information about the Digitalmars-d mailing list