dip1000 and preview in combine to cause extra safety errors
Paulo Pinto
pjmlp at progtools.org
Thu Jun 9 07:20:11 UTC 2022
On Thursday, 9 June 2022 at 00:04:07 UTC, Mathias LANG wrote:
> On Wednesday, 8 June 2022 at 23:35:03 UTC, Walter Bright wrote:
>> On 6/8/2022 12:59 PM, Mathias LANG wrote:
>>> I have argued with Walter for a long time that having `scope`
>>> enforced only in `@safe` code was a grave mistake, and would
>>> be extremely confusing. It would have avoided this situation.
>>
>> The idea is that @safe should be the default and so @system
>> code would be rare and would stick out like a sore thumb.
>>
>> In @system code, maintaining the invariants of the function
>> parameters is entirely up to the programmer.
>
> `@safe` by default is only viable if `@safe` has minimum to no
> friction.
> This isn't the case *at all*. We have examples in the standard
> library itself.
>
> It's also departing from D's identity as a system programming
> language which makes it trivial to interop with C / C++,
> alienating a sizeable portion of our community in the process.
Swift, Ada, Modula-2, Modula-3, Rust, to pick only examples of
languages that have an acknoledged identity as systems
programming languages, had no issue considering calls into C and
C++ unsafe.
Three of them have more users in 2022 than D can ever aspire by
current trends.
More information about the Digitalmars-d
mailing list