I wrote a proposal for memory safety in C++. It's in this month's WG21 mailing. https://t.co/aeh9Q9YCeP
23
86
508
Replies
@seanbax The work you are doing is great for the future of C++ even if the form ends up committeed into ugliness. Did I understand correctly the Itanium ABI on x86_64 is used by circle? Is there a write up on the rationale/pros/cons? When are you next due to live cast an interview?
1
0
1
@seanbax Sean I noticed for the safe context you say “the following make the program ill-formed” but you also list that each unsafe action is “undefined behavior” I thought a program was either ill-formed or UB? Can it be both?
2
0
0
@static_assert_0 It's ill-formed in the safe context. In the unsafe context it could raise UB. The unsafe context is all existing C++ code. It's full of operations that can't be checked for soundness.
0
0
12
@seanbax Why prescribe panic on out of bounds for builtin types etc, instead of making it an implementation-defined choice of exception or panic? For testing & debugging I’d probably want to have exceptions thrown. Or maybe my safety requirements preclude me from abrupt termination
1
0
0
@GpMueller Went back and forth but didn't want to put conditional noexcept-specifiers on the accessors and everything downstream of those. That just makes a mess.
0
0
1
@seanbax I feel too much borrowed from Rust :)) I like how Rust's default behavior is to move values, I wish C++ had that
1
0
0
@seanbax were you surprised by the poll results you mention at the end? “We should promise more committee time on borrow checking?” — SF: 20, WF: 7, N: 1, WA: 0, SA: 0
1
0
0
@nikc_12 Hard to say what the poll means. Somewhat should ask the direction group what the safety strategy is.
1
0
1
@seanbax Recently I've been thinking "where have Sean Baxter's c++ Twitter updates gone? Hope he's ok. " I know see you've been hard at work. Thank you!
0
0
6
@seanbax Good luck with the standards process! Reading @__phantomderp makes me think the process is… challenging 😥
1
0
1
@seanbax I love to be able to restrict my code with "feature on safety". However, I'm worried that it will take forever to agree on what "safety" should be. I think it would be beneficial to have a version number, allowing us to get started sooner.
0
0
0
@seanbax Nice work! Hope not to many complains. The only thing that's a bit confusing is that the examples are made in circle which might be miss leading otherwise great
0
0
0