-preview=safer for D
Lance Bachmeier
no at spam.net
Mon Dec 16 17:16:45 UTC 2024
On Monday, 16 December 2024 at 14:24:53 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> On 17/12/2024 3:10 AM, Lance Bachmeier wrote:
>> On Sunday, 15 December 2024 at 12:05:46 UTC, matheus wrote:
>>
>>> Some people are lazy and they will just write/do things to
>>> get the job done unfortunately.
>>
>> "Lazy" and "unfortunately" are not accurate. Memory safety
>> comes with a non-trivial cost, and in many cases, no benefit.
>
> Neither is this fully accurate.
>
> Memory safety when it properly models memory movement, does
> offer benefits in terms of optimization. Both logical bugs, and
> memory safety related issues can be caught.
But that's only a benefit if the optimization matters. For most
of what I do, it doesn't. If you use the GC for your D code but
interact with C libraries, you have the PITA of the compiler
saying something's not memory safe, but 100% of the time spent
getting it to compile is memory safety theater.
More information about the Digitalmars-d
mailing list