Google's take on memory safety

Lance Bachmeier no at spam.net
Sat Mar 9 23:32:21 UTC 2024


On Saturday, 9 March 2024 at 20:18:41 UTC, Walter Bright wrote:
> On 3/8/2024 6:33 PM, Gregor Mückl wrote:
>> You're talking about an absolutely *gigantic* amount of 
>> software - an utterly, unfathomably, big amount. Many thousand 
>> lifetimes' worth of work.
>
> That's why D enables hybrid C/D programs. D can be gradually 
> introduced into an existing C code base.

I "ported" a few thousand lines of C to D in a couple hours this 
afternoon. That includes the time it took to put all C memory 
allocation inside SafeRefCounted. With the overhead out of the 
way (setting up the SafeRefCounted structs, testing, and some 
minor other things) I bet I could easily port 20,000 lines in an 
8-hour day. Working directly with C macros was the last thing 
needed to make this go fast.


More information about the Digitalmars-d mailing list