Earlier quoted context omitted.
How can you simultaneously call cpp a mature language with mature tooling and acknowledge that there's no working package manager used by any "serious" project?
Do you people really not realize how completely asinine you sound with these lowbrow comments? I'll give you a hint: did you know that C also has no package manager?
Matt Godbolt sold me on Rust by showing me C++
271–280 of 675 posts
Re: Matt Godbolt sold me on Rust by showing me C++
#272Earlier quoted context omitted.
Do you people really not realize how completely asinine you sound with these lowbrow comments? I'll give you a hint: did you know that C also has no package manager?
Yeah, and it's also much worse for it. There's a reason everyone in C uses their own linked list implementation and it's not because it's a platonic ideal of perfect software.
Re: Matt Godbolt sold me on Rust by showing me C++
#273Earlier quoted context omitted.
> Every single package manager couldn’t handle my very basic and very popular dependencies Well there's your problem - no serious project uses one. > I’m convinced it’s a bunch of masochists People use cpp because it's a mature language with mature tooling and an enormous number of mature libraries. Same exact reason anyone uses any language for serious work.
How can you simultaneously call cpp a mature language with mature tooling and acknowledge that there's no working package manager used by any "serious" project?
Re: Matt Godbolt sold me on Rust by showing me C++
#274 template explicit Quantity(T quantity) : m_quantity(quantity) {
sendOrder("GOOG", false, Quantity(static_cast(atoi("-100"))),Re: Matt Godbolt sold me on Rust by showing me C++
#275Earlier quoted context omitted.
> The one thing that sold me on Rust (going from C++) was that there is a single way errors are propagated: the Result type. No need to bother with exceptions This isn't really true since Rust has panics. It would be nice to have out-of-the-box support for a "no panics" subset of Rust, which would also make it easier to properly support linear (no auto-drop) types.
I wish more people (and crate authors) would treat panic!() as it really should be treated: only for absolutely unrecoverable errors that indicate that some sort of state is corrupted and that continuing wouldn't be safe from a data- or program-integrity perspective. Even then, though, I do see a need to catch panics in some situations: if I'm writing some sort of API or web service, and there's some inconsistency in…
Re: Matt Godbolt sold me on Rust by showing me C++
#276Earlier quoted context omitted.
Facebook's Folly has a similar type: folly::Expected (dating to 2016).
If I had to guess, that idea came from Andrei Alexandrescu.
Re: Matt Godbolt sold me on Rust by showing me C++
#277Earlier quoted context omitted.
Yeah, and it's also much worse for it. There's a reason everyone in C uses their own linked list implementation and it's not because it's a platonic ideal of perfect software.
The question wasn't whether C/C++ are platonic ideals, the question was whether a language can be mature without a package manager.
Re: Matt Godbolt sold me on Rust by showing me C++
#278Earlier quoted context omitted.
The result type does make for some great API design, but SerenityOS shows that this same paradigm also works fine in C++. That includes something similar to the ? operator, though it's closer to a raw function call. SerenityOS is the first functional OS (as in "boots on actual hardware and has a GUI") I've seen that dares question the 1970s int main() using modern C++ constructs instead, and the API is simply a lot b…
> I think c++, the language, is ready for the modern world. However, c++, the community, seems to be struck at least 20 years in the past. Good point. A language that gets updated by adding a lot of features is DIVERGING from a community that has mostly people that still use a lot of the C baggage in C++, and only a few folks that use a lot of template abstraction at the other end of the spectrum. Since in larger sys…
Re: Matt Godbolt sold me on Rust by showing me C++
#279The one thing that sold me on Rust (going from C++) was that there is a single way errors are propagated: the Result type. No need to bother with exceptions, functions returning bool, functions returning 0 on success, functions returning 0 on error, functions returning -1 on error, functions returning negative errno on error, functions taking optional pointer to bool to indicate error (optionally), functions taking r…
unfortunately it's not so simple. that's the convention. depending on the library you're using it might be a special type of Error, or special type of Result, something needs to be transformed, `?` might not work in that case (unless you transform/map it), etc. I like rust, but its not as clean in practice, as you describe
Re: Matt Godbolt sold me on Rust by showing me C++
#280Earlier quoted context omitted.
The result type does make for some great API design, but SerenityOS shows that this same paradigm also works fine in C++. That includes something similar to the ? operator, though it's closer to a raw function call. SerenityOS is the first functional OS (as in "boots on actual hardware and has a GUI") I've seen that dares question the 1970s int main() using modern C++ constructs instead, and the API is simply a lot b…
C++ carries so much on its back and this makes its evolution over the past decade even more impressive.