Live data from Hacker News

Moving from Rust to C++

raphlinus.github.io

141–145 of 145 posts

Re: Moving from Rust to C++

#141

I 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…

April 1st is the Black Friday for shitposts.

Re: Moving from Rust to C++

#142
post #92

Earlier quoted context omitted.

For what use cases have you been moving from Swift to C++ and what benefits have you seen? Unrelatedly, given that they all compile down to LLVM IR, in some sense Rust, Swift, and C++ are all syntactic sugar, aren’t they?

Yes, and no. I think Swift is doing some things that it can't optimize as well yet. I have some guesses about what that is (forced ref-counting, less control over memory layout, generics), but all I know is I'm getting significant performance gains in some graphics/geometry algorithms where I want to be a performance perfectionist and control everything. This is not a common use case. For building a basic app for iOS…

Why C++ though, when there's Rust? I understand that rewriting/refactoring projects from C++ to Rust may not be a good idea (in most cases at least). But starting a new project (or porting from a different language) in C++ doesn't make sense to me nowadays (unless pretty much any potential dependency of that project is written in difficult-to-wrap-in-Rust C++)

Especially if you're coming from Swift anyways (which is more closer to Rust than C++).

Re: Moving from Rust to C++

#143

It is a bad discussion culture if discussing C++'s benefits is just a joke. "WE are better in every aspect, and joining the other team is sooo absurd, the idea is obviously a joke."

What was one of the benefits of C++ that was discussed? It seems like everything mentioned also comes with a terrible faustian bargain. For instance, C++ build systems are as plentiful as they are byzantine and torturous. Some new language features are heaven, but when your compiler hasn't implemented them yet, suddenly you're in hell. And the fact that bigots tend to feel freer in C++ communities than in rust commun…

>Some new language features are heaven, but when your compiler hasn't implemented them yet, suddenly you're in hell

So I pick up a Rust project about once a year, and I always try and keep with stable releases. Yet every project I find some small should-be-obvious thing that's nightly only, and I either have to swallow my frustrations and find a work-around or switch to nightly for the project -_-

Re: Moving from Rust to C++

#144

Earlier quoted context omitted.

What was one of the benefits of C++ that was discussed? It seems like everything mentioned also comes with a terrible faustian bargain. For instance, C++ build systems are as plentiful as they are byzantine and torturous. Some new language features are heaven, but when your compiler hasn't implemented them yet, suddenly you're in hell. And the fact that bigots tend to feel freer in C++ communities than in rust commun…

>Some new language features are heaven, but when your compiler hasn't implemented them yet, suddenly you're in hell So I pick up a Rust project about once a year, and I always try and keep with stable releases. Yet every project I find some small should-be-obvious thing that's nightly only, and I either have to swallow my frustrations and find a work-around or switch to nightly for the project -_-

Which things have you run into lately? Just curious!

Re: Moving from Rust to C++

#145
Well ... I fell for it. I'm just a beginner Rust programmer, I don't know the characters involved in Rust so I didn't know Ralhlinus, and I didn't read it on April 1. - so I feel I wasted my time, I was just irritated by some of the statements, but I couldn't tell fact from sarcasm. This is a very in-group kind of joke; I am left wondering what was sarcasm and what are facts.
Post reply on HN