4 ms·
> By avoiding dynamic linking, I think, Rust positions itself best as the no-compromise, high performance, modern, systems programming language. You can use st
by randomNumber7 6y ago
> By avoiding dynamic linking, I think, Rust positions itself best as the no-compromise, high performance, modern, systems programming language.
You can use static linking in c++ if you want to. There is 0 advantage in not having the option to use dynamic linking if you want to. It might be even more secure if e.g. the program links dynamically against a commonly used library and this library is updated regularly.
- deleted 6y ago[deleted]
- RcouF1uZ4gsC 6y ago> You can use static linking in c++ if you want to. There is 0 advantage in not having the option to use dynamic linking if you want to. While you can do static linking in C++ if you want to, you still pay the cost for support for dynamic linking because of ABI issues. You can static link, but you still lost out on new language features and changes that break ABI and so you are still stuck with sub-optimal standard library code. For example, for years, until GCC 5, GCC std lib had a non-standard, slower copy on write implementation of std::string, that stuck around for so long because it would break ABI to change it. Even now, in MSVC STL, there are a lot of performance optimizations which the maintainer acknowledges, but will have to wait because they would break ABI. So even if you just statically link and continuously build in C++, you are still paying the price for support of dynamic linking.
- pjmlp 6y agoMicrosoft breaks the ABI all the time, this is why there is usually several MSVCrt.dll versions installed. Visual Studio 2017 - 2019 were the first time they ever bothered with it, plus it is planned that VS vNext will break it again. This not counting the other C++ compilers on Windows with their own standard libraries, like C++ Builder and Intel C++. There is always COM/WinRT if I want an OOP ABI that doesn't break as easily.
- a1369209993 6y ago> There is 0 advantage in not having the option to use dynamic linking if you want to. The advantage is in other people (eg libc maintainers) not having the option to require you to use dynamic linking when you don't want to.