3 ms·
What the article completely glosses over is the second part of Russinovich's sentence: "it's time to halt starting any new projects in C/C++ and use Rust for th
by rob74 4y ago
What the article completely glosses over is the second part of Russinovich's sentence: "it's time to halt starting any new projects in C/C++ and use Rust for those scenarios where a non-GC language is required." - now, I know that there are lots of programmers who think that of course, their project needs every last drop of performance the CPU can give them, and are willing to saddle themselves with the complexities of Rust memory management (or the dangers of C/C++ memory management) to get it, but still, it's a good idea to consider if a GC language wouldn't be a better fit.
- nraynaud 4y agoAnd also a well implemented GC (ie probably not python) is more efficient than malloc/free by miles (the way they do it is that they just increment the pointer to the end of the slab without any check ; the MMU will trigger if it's unhappy). So either you manage your memory by slabs yourself without a GC, but you still don't have access to some code styles (like creating a ton of short lived objects), or you pay your malloc/free dues. Sometimes, like if you are messing with graphs pointers and malloc (because it's not yet time to refactor to introduce a memory slab system), you can get the worst of both world: you allocate slowly with malloc, but you don't know when to exactly deallocate, so you still have to retain everything until you can nuke the entire graph at once, and each element will require a slow free().
- kevlar700 4y agoAda offers security and simplicity and is already part of GCC but also has llvm now. Linux kernel drivers have also been demonstrated. Perhaps it would be healthier for Rust to have competition? https://www.linux.com/audience/developers/hacking-the-linux-kernel-in-ada-part-1/ https://www.linux.com/audience/developers/hacking-the-linux-... https://github.com/alkhimey/Ada_Kernel_Module_Framework https://github.com/alkhimey/Ada_Kernel_Module_Framework https://alire.ada.dev/ https://alire.ada.dev/ Nvidia also chose Spark; a built in subset of Ada as being more cost effective for secure code than C++. https://youtu.be/2YoPoNx3L5E https://youtu.be/2YoPoNx3L5E Assembly is also supported by Ada and I found it far easier to add than with C even. C interface support is also excellent.