Re: Friends in D, a new idiom?

2018-05-27 Thread Vijay Nayar via Digitalmars-d
On Sunday, 27 May 2018 at 06:37:56 UTC, IntegratedDimensions wrote: I'm looking for something lightweight and direct. It is not for total encapsulation control but to simply provide an extra level of indirection for write access to make the object look read only to those that directly use it.

Re: Friends in D, a new idiom?

2018-05-26 Thread IntegratedDimensions via Digitalmars-d
On Sunday, 27 May 2018 at 06:24:13 UTC, Vijay Nayar wrote: On Sunday, 27 May 2018 at 05:25:53 UTC, IntegratedDimensions wrote: Re: Friends in D, a new idiom? In D, there's no exact equivalent to friend, but there are a few more specialized tools at your disposal. Normally all code i

Re: Friends in D, a new idiom?

2018-05-26 Thread Vijay Nayar via Digitalmars-d
On Sunday, 27 May 2018 at 05:25:53 UTC, IntegratedDimensions wrote: Re: Friends in D, a new idiom? In D, there's no exact equivalent to friend, but there are a few more specialized tools at your disposal. Normally all code in the same module is essentially a friend, so if the classe

Friends in D, a new idiom?

2018-05-26 Thread IntegratedDimensions via Digitalmars-d
(Please don't respond if you are going to attack me in any way! I only accept answers that are meaningful to me and if you come up with the wrong answer don't get offended when I tell you it's wrong, if you do, expect to to get it thrown back in your face) Was having to restrict write access t