upvote
The "goto" in languages like C or C++ is de-fanged and not at all similar to the sequence break jump in "Go To Statement Considered Harmful". That doesn't make it a good idea, but in practice today the only place you'll see the unstructured feature complained of is machine code/ assembly language.

You just don't need it but it isn't there as some sort of "escape hatch" it's more out of stubbornness. Languages which don't have it are fine, arguably easier to understand by embracing structure more. I happen to like Rust's "break 'label value" but there are plenty of ways to solve even the trickier parts of this problem (and of course most languages aren't expression based and wouldn't need a value there).

reply
That relies on a programmer doing the right thing and knowing when to use the escape valve. From the codebases I've seen, I don't trust humans in doing the right thing and being judicious with this. But it's a good point, knowing when to deviate from a pattern is a strong plus.
reply
That's why code reviews exist, it's good process to make code reviews mandatory.
reply
It's too much of a stretch to call null an escape hatch, or to pretend that code reviews will somehow strip it out.

The OpenJDK HashMap returns null from get(), put() and remove(), among others. Is this just because it hasn't been reviewed enough yet?

reply
> pretend that code reviews will somehow strip it out.

Code reviews 'somehow' strip out poorly thought out new uses of escape hatches.

For your example, it would be an use of get, put or remove without checking the result.

reply