4 ms·
>I hope Rust comes out as the winner in the current crop of possible C/C++ replacements What makes you think C and C++ will be replaced? I see no systems prog
by DeathArrow 5y ago
>I hope Rust comes out as the winner in the current crop of possible C/C++ replacements
What makes you think C and C++ will be replaced?
I see no systems programming language that's simpler than C and no systems programming language as flexible as C++.
Being that C++ is huge already and its developers like to add features after features, it's almost guaranteed that you can find a subset of C++ that suits the way you like to work.
- pjmlp 5y agoPeople tend to forget that we use those languages, because the gatekeepers of certain platforms only offer them as supported option, with nice tooling and libraries. Naturally one can bring others into the game, when they are willing to replace the platform owners in the whole stack beyond a bare bones compiler.
- eternityforest 5y agoI don't see any reason a language needs to be simple, as long as the abstractions are close enough to zero cost. Since Rust can run on even 8 bit microcontrollers, it should be able to replace C in a lot of places. There might be some set of tools out there that will make C++ as safe as Rust(It seems like some are talking about borrow checkers but finding it near impossible?), but Rust is designed for safety from the ground up. Plus, even if your linter catches 100% of bugs, your libraries probably won't use those standards, and may be full of bugs. Not that you'd ever do a JS-level amount of reuse in C, since the lack of standardized package management sometimes makes it not even worth it to use a library, almost like they actively want to discourage reuse. Rust has a problem with some things being community that should be stdlib, but standard practice in C++ seems to be to reinvent way more wheels than other languages.
- pjmlp 5y agoHere for some borrow checker like information, https://devblogs.microsoft.com/cppblog/lifetime-profile-update-in-visual-studio-2019-preview-2/ https://devblogs.microsoft.com/cppblog/lifetime-profile-upda... https://llvm.org/devmtg/2019-04/slides/TechTalk-Horvath-Implementing_the_C++_Core_Guidelines_Lifetime.pdf https://llvm.org/devmtg/2019-04/slides/TechTalk-Horvath-Impl...
- bluejekyll 5y agoYour comment seems to ignore all the evidence that shows approx, 70% of security related issues come from those memory unsafe languages. Two independent large companies found that same statistic on two entirely different and large code bases. Google and Microsoft. You can ignore those findings as you like, but that is why so many people are interested in Rust.
- pjmlp 5y agoYet, those same companies are doubling down in C++ for many of their new projects. Chrome isn't going to adopt any Rust, and Firefox is a few percentilies away to matter at all. Android now has Rust, yet it isn't exposed to app developers, NDK is all about C and C++, as is the newly introduced AGK for game developers. AMD/Intel/NVidia now employ many of the ISO C++ contributors and are pushing on using standard C++ as the lingua franca of GPGPU computing. Azure Sphere, being sold as top security IoT device, has C SDK. The new WinUI / WinAppSDK are mostly coded in C++, with bindings for other languages. Apple just released C++ bindings for Metal, as alternative to the existing Swift ones. So, yeah their business units don't seem to be very keen in following the security advices anyway.
- bluejekyll 5y agoAll of those are existing software products, the sunk cost into those is so high that overcoming is monumental. Firefox continues its journey. The better question is what should they do with new software. The analogy I see is an industry similar to the auto industry as it decides what to do with their ICE based platforms as consumers are going after all electric.
- pjmlp 5y agoNot really, AGK, Azure Sphere or WinUI/UWP are post the famous security reports. Regular consumers are going electric when they become cheaper and usable as ICE vehicles, until then they are fine for rich people with garage.
- alkonaut 5y agoMemory safety just isn't going to be optional in most contexts. Whether you achieve it by a GC, borrow checker etc will be the option. > I see no systems programming language that's simpler than C I guess that depends on what "simple" means