News for hackers. Stuff that matters.
Re:Ziglings: Learn the Zig programming language by fixing ti... by pjmlp on Sunday February 14, 2021 @02:12AM (#26130336)
I assume you aren't that comfortable with ISO C++, the standard does allow for failible allocations.

That is the role nothrow in placement new, and custom STL allocators as language tool.

Additionally plenty of APIs now have exception and error based versions with noexcept.

Re:Ziglings: Learn the Zig programming language by fixing ti... by fpoling on Sunday February 14, 2021 @03:19AM (#26130558)
The fallible allocators require to use exceptions. There is no way to use, for example, C++ containers with fallible allocators and disabled exceptions.

But even with exceptions enabled fallible allocation in practice does not work. There was an article that made malloc to return null randomly. All tested C++ implementations crashed then because they allocated memory when generating exceptions.

Re:Ziglings: Learn the Zig programming language by fixing ti... by pjmlp on Sunday February 14, 2021 @03:38AM (#26130640)
Stop talking in circles and point out ISO C++20 sections then.

I am also curious to see how serious was that article.

Re:Ziglings: Learn the Zig programming language by fixing ti... by fpoling on Sunday February 14, 2021 @04:59AM (#26130974)
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p070... - this discusses a lot of issues with exceptions as in ISO C++ and concrete proposals to make exceptions cost-free. The section 4.3.5 discusses specifically memory allocations.
Re:Ziglings: Learn the Zig programming language by fixing ti... by pjmlp on Sunday February 14, 2021 @09:00AM (#26132423)
Including parts that relate to Linux, have nothing to do with C++ and apply to any programming language.

You also skipped the section where Rust in its present state doesn't has any kind of recovery, it just panics.