OFF TOPIC Re: Range of enum type values
Timon Gehr
timon.gehr at gmx.ch
Sat Dec 28 21:56:53 UTC 2019
On 28.12.19 22:08, Walter Bright wrote:
> On 12/28/2019 12:22 PM, Johan Engelen wrote:
>> You are saying: the spec says @safe means no UB, and if the spec
>> doesn't say it then it simply needs updating. There are a number of
>> text pieces that say that.
>>
>> I am saying: regardless of what the spec and any of those articles
>> promise, current D behavior is that @safe _can_ have UB in it.
>>
>> I know most people don't like to hear it nor acknowledge it. But I
>> think it is better to be realistic about this. `@safe` currently does
>> _not_ mean the code is super safe.
>
> What it does mean is that all instances of #safe resulting in
> #undefinedBehavior should be logged either in bugzilla
Yes.
> or noted as an exception in the #specification.
> ...
Yes, but the only reasonable kinds of exceptions are invalid
@trusted/@system code or specific compiler flags to disable safety (e.g.
-boundscheck=off). There can't be any other exceptions.
More information about the Digitalmars-d
mailing list