News for hackers. Stuff that matters.
Re:The initial proposal for a C++ Ecosystem International St... by tsimionescu on Tuesday October 18, 2022 @06:06PM (#33254683)
All of this complicates the program significantly, and greatly reduces the advantages of RAII. If you're not using the constructors for initialization, than your desturctors also have to handle the case where the objects didn't even attempt to acquire the resource they may represent, for example.

Also, how to handle a failure to release a resource is context dependent, you can't encode it in the type of the resource unless you create a different type for each call site.

Re:The initial proposal for a C++ Ecosystem International St... by fluoridation on Tuesday October 18, 2022 @06:16PM (#33254786)
If you really need to do something different at each release point then you can have do_something_special_on_deallocation_failure() notify the error to the release point by a number of different mechanisms.

Yes, all of this makes the code more complicated. The point of these features is not to make the code simpler, but to make it more robust. Rust is also more complicated than C.

Re:The initial proposal for a C++ Ecosystem International St... by germandiago on Wednesday October 19, 2022 @02:59AM (#33258622)
Yes, without exceptions is more involved, but way easier than any C alternative doing couple-of-functions mstching for alloc/dealloc.