Discussion Thread: DIP 1028--Make @safe the Default--Final Review
bachmeier
no at spam.net
Thu Mar 26 03:36:15 UTC 2020
On Wednesday, 25 March 2020 at 18:04:33 UTC, Steven Schveighoffer
wrote:
> On 3/25/20 1:34 PM, bachmeier wrote:
>> On Wednesday, 25 March 2020 at 14:10:18 UTC, Steven
>> Schveighoffer wrote:
>>
>>> Everything else in the DIP is possibly annoying to deal with
>>> but at least doesn't silently destroy the meaning of @safe.
>>
>> To be perfectly honest, I can't imagine D being a sensible
>> option for someone wanting to work heavily with C code if you
>> have to add pointless annotations and constantly deal with
>> compiler errors. It's not a matter of annoyance, it's simply
>> impractical to add that kind of overhead, particularly if
>> someone else is involved. If you're using C, you're well aware
>> that it's not going to be safe. Rust was designed for
>> *writing* safe code, not for wrapping C libraries, which is
>> maybe the main use of D right now.
>
> This is overblown. Adding @system: at the top of a c library
> header is not hard.
>
> Tools which generate headers for C libraries (e.g. dpp) can
> automatically do the right thing.
>
> -Steve
Let me put it differently. Suppose I release a linear algebra
library that's a wrapper over a C library. Nobody using D the way
it's supposed to be used can use my library. It just doesn't make
sense for a language that claims strong C interoperability.
Anyway, I'm going to let this die, because nobody else sees it as
an issue.
More information about the Digitalmars-d
mailing list