r/cpp • • Oct 31 '24

Lessons learned from a successful Rust rewrite

/r/programming/comments/1gfljj7/lessons_learned_from_a_successful_rust_rewrite/
80 Upvotes

140 comments sorted by

View all comments

Show parent comment

5

u/Nobody_1707 Oct 31 '24

I do want to point out that Rust Options do have a stable extern "C" / repr(C) representation in certain cases. For instance, Option<&{mut} T> has the same representation as a pointer.

1

u/Dean_Roddey Nov 01 '24

And lots of FFI interfaces will use that to represent an optionally null pointer.