Liste des Groupes | Revenir à cl c |
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:On 05.04.2025 16:54, Scott Lurndal wrote:Kaz Kylheku <643-408-1753@kylheku.com> writes:>On 2025-04-04, Thiago Adams <thiago.adams@gmail.com> wrote:What do you think of this control block?
[...]
I don't believe C++ exceptions are useful in this case, either,
and I avoid using them for general purpose error handling.
I'd have wished that they were available back then when we
started using C++ regularly in the early 1990's.
I was using C++ (cfront 2.1) for operating system code in 1990.
We couldn't have used exceptions even when they were introduced
in cfront 3 for that project.
I strongly believe errors must be handled immediately when
detected, rather than deferring to some nebulous code a long
way in both space and time from the actual error.
The only use I see for C++ exceptions is a cleaner
sigsetjmp/siglongjmp, and even then I've used
the later when the former is available. As an
experiment, I once replaced the sigsetjmp/siglongjmp
calls with C++ exceptions and found that using exceptions
reduced application performance by a double-digit percentage
for that particular applications (processor simulator).
Les messages affichés proviennent d'usenet.