Discussion Thread: DIP 1028--Make @safe the Default--Final Review
Steven Schveighoffer
schveiguy at gmail.com
Thu Mar 26 15:02:15 UTC 2020
On 3/26/20 10:40 AM, jmh530 wrote:
> On Thursday, 26 March 2020 at 14:12:24 UTC, Steven Schveighoffer wrote:
>> [snip]
>> And in actuality, most D code is @safe, so for most D code out there,
>> this is not going to be a huge problem. You will have to mark few
>> things. Wrappers/bindings for C libraries are going to be an
>> exception, and that's just the pain we have to deal with. Either use
>> trusted markings to make everything safe (after verification), or just
>> punt to the user.
>>
>
> There is a lot of functionality that depends on C libraries. For
> instance, every or almost every function in lubeck calls at least one C
> function. If someone comes to D from python and wants to replace
> something from numpy/scipy with a lubeck equivalent, they will need to
> start slapping @trusted or @system on everything. That means they will
> need to understand the safety system and why stuff like that matters.
> For some people, that may be a big enough burden that they just throw up
> their hands and keep using python.
>
Writing
@system:
At the top of your modules is not a big burden. If that drives you away
from the language, then I'm sorry to say that you are missing out on the
awesomeness of D, but I can't really help you.
How many people were driven away from windows development because they
had to deal with __stdcall? You just googled for it (or whatever the
hell was available at the time), said "oh this is how you do it", and
did it. It wasn't a problem, you just did it.
This is only even a discussion because of the current situation. If D
started out this way, you would have no idea there was even a problem here.
-Steve
More information about the Digitalmars-d
mailing list