Hacker News new | ask | show | jobs
by sgift 3462 days ago
I'd rather have one C++ compiler that works great on every platform than multiple ones that only work on one (or two) platforms.
1 comments

GCC is a great C++ compiler that works on more platforms than the rust compiler. Clang, another great C++ compiler, works on at least as many platforms as the rust compiler.

Again, why would this be a reason to prefer rust over c++?

On the off chance that you aren't being deliberately obtuse, here's what's going on:

If, given two situations

1. The the set containing compilers for language L is size 1, and that compiler works on multiple platforms; or

2. The set of compilers is > 1, but there exists at least one compiler in the set which is a) popular for use with language L b) not fully interoperable with the other compilers from the set that satisfy (a); then

situation 1 is the preferable one

Or to put it another way, nobody complains about code not working with compilers that don't exist.

3. The set of compilers is > 1, and there exist at least a popular compiler that works on multiple platform.

Rust is in 1 of course. C++ is both in 2 and 3. In particular for C++, the compiler in 3 works on a strict superset of all the platforms supported by rust.

As you are free to support only this C++ compiler and ignore every other C++ compiler (you must not care about multiple implementations otherwise you wouldn't think that 1 is a good solution), it seems to me that 3 is strictly better than 1.

edit: I do concede that the existence of a popular but non-interoperable compiler[1] does fragment the community and it has been an issue in C++. Things are getting better though, and if rust becomes popular enough it might become an issue there as well.

[1] We all know which compiler I'm talking about.