Discussion Thread: DIP 1028--Make @safe the Default--Final Review

Timon Gehr timon.gehr at gmx.ch
Mon Apr 6 03:18:31 UTC 2020


On 06.04.20 04:43, Walter Bright wrote:
> On 4/5/2020 12:22 PM, Timon Gehr wrote:
>> I really doubt that. It's a simple rule. The version that is easiest 
>> to implement is you simply disallow extern(C) functions without body 
>> to be marked @safe. It's a single `if` statement in an appropriate place.
> 
> Famous last words.
> 
> Just look at the swamp of misery from "simple" C rules, such as their 
> effect on C++ overloading. The quagmire got a lot worse when C++ added 
> type inference. I attended a Scott Meyers talk that was a full hour long 
> just on the weird special cases forced on C++ due to those simple rules. 
> Companies pay Scott a boatload of cash for these lectures.
> 
> I wouldn't be surprised if more than half of the bugs in bugzilla are 
> the result of an unexpected interaction between simple exceptions to rules.
> 
> I've been around this block a few thousand times. Remember, it ain't 
> just the compiler. The users don't remember these exceptions. Every one 
> of them makes the language harder to learn and master.

Moving goal posts. Your claim was it's hard to implement. The remainder 
of the post you quoted selectively out of context already refutes your 
argument comprehensively.


More information about the Digitalmars-d mailing list