News for hackers. Stuff that matters.
Re:The Year of C++ Successor Languages by kajaktum on Monday January 02, 2023 @06:10AM (#34216641)
>If anything it enables the enforcement of strong invariants and leads to better and safer code.

How?? If a container have `get(K)->V` and `remove(K)->V` then how does it preserve this invariant? This is an impossible contract to satisfy once you try to push once and pop twice. The container is promising you something that it can't satisfy, I would rather have a container that's honest with `get(key)->Maybe(value)`.

Re:The Year of C++ Successor Languages by mgaunard on Monday January 02, 2023 @06:19AM (#34216718)
You have it backwards, the strong invariant is that you have a container and not a maybe container.