Comment

Comment by kwant_kiddo

Okay, do you think the effort is worthwhile? Or do you think migrating to a language with a bigger runtime would have been a better choice? Because that is usually the conclusion I make. If you can afford that the compiler emits code for exception handling in all your functions and pay rtti then maybe your problem does not need that kind of performance in the first place. And you get all the downsides of using C++, and don't benefit from the upsides => just write it in go/java/c#

I think another big issue is the complexity overhead of 'introducing' exceptions in a already complicated language. When you use exceptions the control flow of the program gets 'invisible' should you recover from a exception.

Also, just writing data structures in general that obeys the weak and/or strong exception guarantee is not very easy [1].

Like it makes writing (correct) C++ even harder than it already is.

[1]: https://en.cppreference.com/w/cpp/language/exceptions

parent kwant_kiddo 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton