Can we just have struct inheritence already?

Timon Gehr timon.gehr at gmx.ch
Fri Jun 14 00:23:01 UTC 2019


On 14.06.19 00:27, Manu wrote:
> On Thu, Jun 13, 2019 at 7:35 AM Nemanja Boric via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
>>
>> On Thursday, 13 June 2019 at 13:32:05 UTC, Joseph Rushton
>> Wakeling wrote:
>>> On Thursday, 13 June 2019 at 08:24:38 UTC, Nicholas Wilson
>>> wrote:
>>>> No: the spec disagrees with the implementation, therefore at
>>>> least one of them is wrong. It does not immediately follow
>>>> that it is the spec that is in error.
>>>
>>> It's reasonable to say in this case that the spec is in error,
>>> because Walter has always been 100% clear that @safe refers
>>> only to memory safety, and the implementation reflects that
>>> intent.
>>
>> Not really:
>>
>> https://issues.dlang.org/show_bug.cgi?id=19326
>>
>>> tupleof is known to break through private access protections.
>>> It should probably not be allowed in @safe code.
> 
> Wait... what?
> "tupleof is known to break through private access protections. It
> should probably not be allowed in @safe code." - Walter Bright
> 
> 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.


More information about the Digitalmars-d mailing list