I have some experience with this; we did a similar thing in rpm-ostree starting 
around https://github.com/coreos/rpm-ostree/pull/2336#issuecomment-739556744
The rationale there was actually to aid porting to Rust, because we could use 
https://cxx.rs/

There were a lot of things there, see various PRs like 
https://github.com/coreos/rpm-ostree/issues?q=label%3Aproject%2Fc%2B%2B+is%3Aclosed
 around that time (I didn't label all of them, there were a lot).

Definitely dealing with NUL terminated strings versus C++ strings *and* Rust 
strings was and is a notable pain.

Probably the biggest ergonomic problem was exceptions...Rust and C align there, 
and "standard" C++ doesn't.  Of course it's possible to use C++ without 
exceptions...but, it's an ecosystem bifurcation.

> It is a ridiculously large and complicated language

Yes.  Not to be That Person but...I dunno, I have a pretty strong opinion that 
Rust is the right choice for systems software, and for those bits you are 
rewriting, it can pay itself back.  Rust is also very complex and was a huge 
learning curve for me (and others).  The trap with C++ in a nutshell IMO is 
that it can feel very high level, yet low-level things like string_view 
use-after-frees will just come and bite you.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2983#discussioncomment-8869019
You are receiving this because you are subscribed to this thread.

Message ID: 
<rpm-software-management/rpm/repo-discussions/2983/comments/8869...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to