February 26
On Wednesday, 26 February 2025 at 02:37:05 UTC, Mike Parker wrote:
> On Tuesday, 25 February 2025 at 20:23:20 UTC, 12345swordy wrote:
>> On Monday, 3 February 2025 at 18:44:03 UTC, Atila Neves wrote:
>>
>> Which then you have to move other things that rely on accessing the class private variables/functions.
>>
>>
>> - Alex
>
> You make those private things package.

You could also make private things public as well. Which at that point I don't think that what the programmer meant nor want.


- Alex
March 03

On Tuesday, 25 February 2025 at 20:23:20 UTC, 12345swordy wrote:

>

On Monday, 3 February 2025 at 18:44:03 UTC, Atila Neves wrote:

>

On Saturday, 27 April 2024 at 09:25:13 UTC, Daniel N wrote:

>

This is an alternative to "private(this)".

I think it would be much more interesting if it was possible to separate read and write permissions instead.
(The syntax is just an example, not that important, just for illustration purposes.)

[...]

One can always move the class to another module.

Which then you have to move other things that rely on accessing the class private variables/functions.

  • Alex

Yes, which I'll argue is a good thing since it'll force you to think about how to best organise the code.

March 03
On Monday, 3 March 2025 at 09:08:03 UTC, Atila Neves wrote:
> On Tuesday, 25 February 2025 at 20:23:20 UTC, 12345swordy wrote:
>> On Monday, 3 February 2025 at 18:44:03 UTC, Atila Neves wrote:
>>> On Saturday, 27 April 2024 at 09:25:13 UTC, Daniel N wrote:
>>>> This is an alternative to "private(this)".
>>>>
>>>> I think it would be much more interesting if it was possible to separate read and write permissions instead.
>>>> (The syntax is just an example, not that important, just for illustration purposes.)
>>>>
>>>> [...]
>>>
>>> One can always move the class to another module.
>>
>> Which then you have to move other things that rely on accessing the class private variables/functions.
>>
>>
>> - Alex
>
> Yes, which I'll argue is a good thing since it'll force you to think about how to best organise the code.

Code organization and encapsulation are orthogonal to each other. Intent matters more.
1 2
Next ›   Last »