Earlier quoted context omitted.
as you said, its annoying and a complete waste of time. Its essentially someone lying to their audience. As someone trying to build a reputation or a following, how do you do that?
This is truly an impressive thread. HN will really complain about anything. It doesn't matter how innocuous the article. Some might say everyone on here is chronically online, but I don't think that's true. It's really just part of the culture that every post on here is treated as an invitation to read into the author's intentions and assume the worst of their character. Doesn't matter what the article is actually ab…
Moving from Rust to C++
61–70 of 145 posts
Re: Moving from Rust to C++
#62> Here, it is clear that Rust is held back by its commitment to not break existing code (enacted by the edition mechanism), while C++ is free to implement backwards compatibility breaking changes in each new version. This is well done.
I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there
Re: Moving from Rust to C++
#63Re: Moving from Rust to C++
#64Glad I came back through HN to read the comments, because without that I would have left that blog with a very different opinion.
Re: Moving from Rust to C++
#65Earlier quoted context omitted.
I don't feel like this content is "just" a joke. It is a joke, it's also a discussion of what the author views as c++'s shortcomings. It's valuable to have things like that written down every now and then, to give people context about why other people have made the choices they have.
Yeah but, is there any argument that’s more tiresome than Rust people pointing and laughing at C++?
Re: Moving from Rust to C++
#66> Here, it is clear that Rust is held back by its commitment to not break existing code (enacted by the edition mechanism), while C++ is free to implement backwards compatibility breaking changes in each new version. This is well done.
Maybe I am being dumb, but isn’t the opposite true? Or is that the joke? I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there
Re: Moving from Rust to C++
#67I wonder what's the consensus on HN about April Fools blog posts like this one. It's probably a cultural thing but I really feel like it's a waste of time, both for the readers and the writer. I don't want to be overly negative because of course they can be a way of publicizing cool things (in this case an open source library). It's just that every April 1st I open a lot of links only to be disappointed that their co…
> "Ah yes, the timeless debate of Rust vs C++. It's like watching two old men argue about whose flip phone has better reception. At this point, who cares? The fights over one's choice of programming language are like a bunch of kids arguing over which color crayon is the best. It's petty, pointless, and ultimately irrelevant to the bigger picture. At the end of the day, what matters is not the language you use, but the quality of the code you produce. Choosing a programming language is like choosing a tool for a job – you should use the one that is most appropriate for the task at hand. Whether it's C++, Rust, Python, or whatever else floats your boat, the key is to use it effectively and efficiently. So, instead of wasting time arguing over programming languages, let's focus on writing good code and solving real-world problems. After all, nobody cares what language you used to create the next big thing, as long as it works and gets the job done."
Re: Moving from Rust to C++
#68Re: Moving from Rust to C++
#69> Here, it is clear that Rust is held back by its commitment to not break existing code (enacted by the edition mechanism), while C++ is free to implement backwards compatibility breaking changes in each new version. This is well done.
Maybe I am being dumb, but isn’t the opposite true? Or is that the joke? I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there
> C++20 brings us modules, an innovative new feature, and one I’m looking forward to actually being implemented fairly soon. Looking forward, C++26 will likely have stackful coroutines, the ability to embed binary file contents to initialize arrays, a safe range-based for loop, and many other goodies.
> By comparison, the pace of innovation in Rust has become more sedate.
The reason C++ is getting all these new features while Rust isn't is not Rust being held back by backwards compatibility, but that Rust has all those features already.
So he's basically saying: C++ is breaking backwards comparability to (eventually, years after the spec was published) bring us features that Rust already has.
Re: Moving from Rust to C++
#70> Here, it is clear that Rust is held back by its commitment to not break existing code (enacted by the edition mechanism), while C++ is free to implement backwards compatibility breaking changes in each new version. This is well done.
Maybe I am being dumb, but isn’t the opposite true? Or is that the joke? I can’t tell if the joke is that backwards compatibility is good or whether it’s that the languages are switched there
C++, by contrast, has a tradition of maintaining backwards compatibility, but it is not enforced systematically, and in practice migrating to newer versions of C++ can be a painful process. Thus, in many application domains (especially embedded), developers are stuck on very old versions of the language. There's also a very sticky issue of whether binary (ABI) compatibility is guaranteed. There's nothing in the standards process that guarantees this, but there has been huge resistance to proposed improvements that break ABI. This was a particular sticking point for Google[1], as it affects unique_ptr, making it not so much the zero cost abstraction as originally hoped.
Language evolution is a difficult problem, and there is no magic, obviously correct answer to it. But I think Rust has a good, pragmatic approach, and the flaws such as Range are a very small part of the overall language surface area.
Modules are a particularly disruptive to the ecosystem. It's taking a long time to get them properly implemented in C++, and it also requires fairly major changes to code bases, build systems, and other infrastructure to migrate to them. By contrast, Rust has had a decent module system since 1.0 (with various tweaks and changes through the edition mechanism).
Edit: and as 'wongarsu says in a sibling comment, another part of the joke is that Rust doesn't need as much evolution as C++, as it already has a lot of the advantages such as a working module system.
[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p20...