Extending D's support for object-oriented design with private(this)
NotYouAgain
NotYouAgain at gmail.com
Sat Apr 27 05:44:15 UTC 2024
On Saturday, 27 April 2024 at 01:41:54 UTC, Jonathan M Davis
wrote:
>..
> ...
> - Jonathan M Davis
As usual, the only solution you can provide to the problems that
I've very clear outline, are put the class in it's own module.
That is the only solution to the problems.
You say that all that D needs to do.
I say, no, make it easier for me to solve my problems.
A class already has a boundary outside of a module.
Why you so determined to ensure a programmer never has the option
of explicately declaring that boundary to other code in the
class. I just don't get it. I can only presume you don't to oop,
or you put every class in its own module, and every unittest for
that class its own module as well.
Well, no. There is an easier way -> private(this).
No impact at all on existing code as far as I can tell. It's
purely optin.
But I think you're determined to think the same way - in the same
way that you tell me that I'm determined to think the same way ;
I've presented a number of examples now, where private(this)
solves the problem identified.
You're solution is one class per module, no unittest in the
module either.
No. I don't accept this as a good solution to the problems I've
indentified.
More information about the dip.ideas
mailing list