On Wed, 15 Oct 2025 at 00:10, Louis Dionne <ldionne.2@gmail.com> wrote:
> But, just to be clear, many large adopters will need the ability to select the observe semantic in order to deploy this at a large scale. That's an extremely useful tool to have. I don't care if that's not called a "Hardened Implementation", but it should
be possible.
I'm quite certain they will want to select observe for specific cases,
like the one that the paper mentions,
vector::operator[] where you invoke it for e.g. the use case
&vec[vec.size()]. I do not think they want an observe semantic
library-wide,
because that will just give them UB for the cases where no such benign
case exists.
> TLDR: I think the first wording suggestion in your paper makes sense. That makes only `enforce` and `quick_enforce` be valid evaluation semantics for Hardened Implementations and removes `observe`. Contracts and hardening are still useful with the Contracts
MVP, and they'll be more useful once we have additional Contracts features like tagging. That's not a reason to kill either.
That's debatable, but this paper is indeed not about whether there's
reasons to kill contracts.
Which, by the way, nobody has suggested. Moving contracts to a non-IS
ship vehicle doesn't kill them.
_______________________________________________
SG15 mailing list
SG15@lists.isocpp.org
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.isocpp.org%2Fmailman%2Flistinfo.cgi%2Fsg15&data=05%7C02%7Cgdr%40microsoft.com%7C249478e9d2a04505e5cb08de0b66b2d5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638960732902943310%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=VR2RKMo1AJTDpYiSC8ANRlDb6GocrG59MEmQyxdE3Ww%3D&reserved=0