Can we just have struct inheritence already?
Nicholas Wilson
iamthewilsonator at hotmail.com
Thu Jun 13 08:24:38 UTC 2019
On Thursday, 13 June 2019 at 07:27:16 UTC, Walter Bright wrote:
> On 6/11/2019 7:37 AM, ag0aep6g wrote:
>> The spec very much defines @safe as "no undefined behavior".
>>
>> <https://dlang.org/spec/function.html#function-safety>: "Safe
>> functions are functions that are statically checked to exhibit
>> no possibility of undefined behavior."
>
> The spec's wrong, because it doesn't do that.
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.
If you have a race condition on a pointer write, and that write
corrupts memory, then that is a memory safety bug that is also a
thread safety bug.
In the world of multithreading, memory safety and thread safety
are _not_ separable.
I know because we'e had a bug exposed by LDC breaking such
optimisation that relied on that.
More information about the Digitalmars-d
mailing list