Re: Почему в расте отсутствует выброс исключений?
От: Максим Россия  
Дата: 08.02.23 09:05
Оценка:
vaa>Почему в расте отсутствует выброс исключений? Это же удобный способ передачи управления.

Очень хорошая статья по ссылкам.

I suspect that most members of the C++ community vastly underestimate the skills needed to program with exceptions and therefore underestimate the true costs of their use. The popular belief is that exceptions provide a straightforward mechanism for adding reliable error handling to our programs. On the contrary, I see exceptions as a mechanism that may cause more ills than it cures. Without extraordinary care, the addition of exceptions to most software is likely to diminish overall reliability and impede the software development process.

This “extraordinary care” demanded by exceptions originates in the subtle interactions among language features that can arise in exception handling. Counter-intuitively, the hard part of coding exceptions is not the explicit throws and catches. The really hard part of using exceptions is to write all the intervening code in such a way that an arbitrary exception can propagate from its throw site to its handler, arriving safely and without damaging other parts of the program along the way.


“Exception Handling: A False Sense of Security”
https://quuxplusone.github.io/blog/2019/06/17/tom-cargill-on-exception-handling/
Errare humanum est
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.