Hacker News new | ask | show | jobs
by kaashif 776 days ago
Yeah, absolutely. My point is that Option itself doesn't give you this API and to make an unsafe version, you have to explicitly write it.

Including UB in easy to misuse places is totally unnecessary and a footgun which really does cause issues in real code.

1 comments

Yep, I agree completely. Just wanted to point out for completeness that rust can theoretically do the same thing as c++.