Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Deploying for Windows, macOS, Linux, iOS and Android is way easier with Rust than C(++), because there's one build system and one standard library that supports them all without #ifdefs. The ecosystem takes first-class Windows compatibility seriously instead of having a unix and windows dialects and the unix side saying MS sucks and it's your problem it doesn't compile.

The worst part about Rust's cross-platform compatibility and cross-compilation is Rust's dependence on a C linker and C/C++ dependencies if you choose to use them.



Modern C++ has cross platform threads, filesystem access, etc. Unless you're actually trying to use platform specific technology, there's no need for #ifdefs.

For the most part CMake handles the cross platform toolchain issues, so it's just one flag to turn on Release Vs Debug builds, enable LTO, include dependencies etc. Again, it's just platform specific features that require if...endif sections.

The complaints I'm seeing here would be the equivalent of me complaining about Rust's garbage collection, the only difference is that Rust broke everyone's code in removing it while C++ managed to keep almost everything since the 1980s still working.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: