Dlangs inconsistent decision making and ai
Basile B.
b2.temp at gmx.com
Tue Sep 1 20:31:39 UTC 2026
On Tuesday, 1 September 2026 at 14:09:11 UTC, ABrightLight wrote:
> On Sunday, 30 August 2026 at 06:20:12 UTC, Kapendev wrote:
>> I had an idea like that recently on the D Discord server.
>> You could make a friend list for every D module.
>> A friend is allowed to modify anything, even a private field,
>> while a simple acquaintance is forced to follow the rules set
>> by the master and his friends.
>>
>> Example:
>>
>> ```d
>> module std.json;
>> pragma(friends, "master:serg:user1234");
>> ```
>
> I highly recommend staying away from C++'s friend design. It
> will needlessly complicate the language.
In the past I had eventually imagined that `__traits()` could be
a god mode, with a kind of "omnipotence". You can get everything
you want but you can also choose to respect the visibility (since
`__traits()` also permits to get this information). The rationale
is that since finally code based on`__traits()`, i.e meta-prog,
is usually very heavy to write you get get in exchange the
omnipotence.
More information about the Digitalmars-d
mailing list