5 ms·
C++ has innumerable de facto "platforms" and "ecosystems". You have to choose one to get anything done, whether that be various Boost libraries, POSIX, Win32, C
by pcwalton 10y ago
C++ has innumerable de facto "platforms" and "ecosystems". You have to choose one to get anything done, whether that be various Boost libraries, POSIX, Win32, Cocoa, Qt, GTK(mm), even stuff like XPCOM…
Helpfully, many of these platforms reinvent basic things like strings [1] and reference counted smart pointers [2] in incompatible ways.
Wouldn't it be better if there were just one platform?
[1]: http://doc.qt.io/qt-4.8/qstring.html http://doc.qt.io/qt-4.8/qstring.html
[2]: http://doc.qt.io/qt-4.8/qshareddatapointer.html http://doc.qt.io/qt-4.8/qshareddatapointer.html
- hinkley 10y agoIt is pointless to argue with C++ programmers. Just eat their lunch like everybody else has and go about your day. Edit: I've been watching C++ developers tell everyone else for nearly 25 years how the world works and why their new language will never be useful. Enough. The cumulative weight of languages that found success by not copying C++ is staggering.
- saysjonathan 10y agoSome languages have also seen great success with having a standard platform but still allowing users to replace it as needed. The many Haskell Preludes and Jane Street's ocaml core are two such examples. I think the ability to opt out of the rust-platform metapackage is a great feature.
- btown 10y agoAnd notably, C++11 actually moves in this direction, standardizing things like smart pointers [0][1]. It's a very smart move for Rust. Core or near-core library wars in the early days of adoption of a language leads to duplication of effort, and for those invested in seeing Rust gain a set of libraries to rival other languages, this is a great thing. [0] https://en.wikipedia.org/wiki/C%2B%2B11#C.2B.2B_standard_library_changes https://en.wikipedia.org/wiki/C%2B%2B11#C.2B.2B_standard_lib... [1] https://en.wikipedia.org/wiki/Smart_pointer#unique_ptr https://en.wikipedia.org/wiki/Smart_pointer#unique_ptr
- glandium 10y agoActually, C++'s STL is in a weird situation, compared to the standard library in other languages, because the STL is a spec, not an implementation. And there are as many implementations of the STL as there are compilers. This might arguably happen if there were multiple Rust compilers, though. Anyways, the result on the C++ STL is that in many cases, the same types have different performance characteristics on different platforms, or worse, different behavior/bugs.
- aldanor 10y agoNit: C++ Standard Library != STL
- 0xffff2 10y ago>You have to choose one to get anything done I work on multiple medium-sized projects that disagree. If you're not writing GUI code, it's quite possible to write 99% platform agnostic code without the help of a 3rd standard library supplement, especially with C++11.
- pcwalton 10y agoIt's possible, yes. But (a) large pre-existing industry codebases make use of their legacy libraries that predate "modern C++"; (b) that directly contradicts the parent poster's point, in that you're saying that having a standard platform is a benefit.
- arielb1 10y agoWe already have `std` for that. The point of a "Rust platform" is that you can have confidence that the libraries you are using are of decent quality, reasonable popularity, and will be maintained.