Using closure in function scope to make "real" private class members

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Jun 8 08:36:10 UTC 2022


On Wednesday, 8 June 2022 at 08:11:41 UTC, Dom Disc wrote:
> look for all friends in the whole project. I personally *hate* 
> it if I should review a file and then need to look into dozends 
> of other files to do this. And C++ tend to always require this. 
> One of my main reasons to drop C++.

I think many such issues actually are tooling issues and 
architecture issues just as much as language issues.

It is very difficult to talk of C++ being this or that since the 
language itself doesn't impose much structure. You can have a 
good or bad structure, and it really comes down to modelling, 
design patterns, software architecture choices and discipline.

Other languages impose more firm structure and that can be good, 
or bad, depending on what you try to achieve, but you can also 
use tooling to establish a structure so…

Is the language dominating the strucuture?

Or is the structure a result of the culture of the people using 
it?

Most of the time it is the latter, it is the culture and the 
people.



More information about the Digitalmars-d mailing list