D not considered memory safe

Lance Bachmeier no at spam.net
Sat Jul 6 23:14:00 UTC 2024


On Saturday, 6 July 2024 at 22:48:32 UTC, Sebastian Nibisz wrote:
> On Saturday, 6 July 2024 at 14:56:27 UTC, aberba wrote:
>> To say something "doesn't have safety tuned on by default" vs 
>> "something is unsafe" communicates two different meanings.
>
> Is a car that has airbags deactivated by default before each 
> drive safe?

Typing `@safe:` is not a big deal. Turning on safe automatically 
requires anyone working with C code or otherwise writing unsafe 
code to turn it off. To use the airbag analogy, there are people 
for whom airbags are unsafe so they are disabled. Whether that is 
the right choice depends on the costs and benefits of doing so. 
What you can't say is that air bags should always be turned on or 
off in every car because that's safer for you.


More information about the Digitalmars-d mailing list