Can we just have struct inheritence already?
ag0aep6g
anonymous at example.com
Fri Jun 14 05:20:50 UTC 2019
On 14.06.19 02:23, Timon Gehr wrote:
> On 14.06.19 00:27, Manu wrote:
[...]
>> Breaking private access is not in any way shape or form a memory
>> safety violation.
>>
>
> It can very well be if the private data is managed by a @trusted
> interface that assumes @safe code cannot meddle with that data because
> it is private.
Strictly speaking, @trusted can't assume that. One can always write
@safe code in the same module and (accidentally) mess with the private
data that way.
An @trusted function that relies on `private` for safety does not
present an @safe interface to its own module.
In practice, that's often overlooked or ignored, though. With a
restricted tupleof, at least the damage is contained in one module.
More information about the Digitalmars-d
mailing list