(not sure if this is just a C ++ thing)
Exception handling is difficult to learn in C ++ and, of course, is not an ideal solution, but in most cases (except for some specific firmware contexts) this is by far the best solution that we currently have for exception handling .
What about the future?
Are there other well-known error handling methods that are not implemented in most languages ββor are only academic studies?
Put another way: are there (presumably) better known (uncomfortable in order) ways to handle errors in programming languages?
, , errno . , , , . . , , . , . Java , , , , . , catch(...){/* do nothing*/} ( ++ parlence) , , .
errno
catch(...){/* do nothing*/}
, , (, Scala Either, Option , ). , , , , . ( , Haskell Scala.) , , , .
Either
Option
, , - . :
, 1.
, , , :
1) ( C). , .
2) , " " (). , , . Java "" .
3) "" ( IEEE NaNs, ++ ) , . , , , , , .
. (1) , , , . (2) , who-know-where, , , . (3) , , , UB-, ++, .
, : . , , .
" "? . - , , . , POV , POV , (1) (3).
, , - , Erlang , "Let it fail". : "" ( Erlang "" ). , , , , - .
, , , - . ( , Erlang .)
, , , : http://www.erlang.org/download/armstrong_thesis_2003.pdf
Lisp , , .
, , , X Y, Z, , Y,
, -, , , - , , . , isSatisfied , isSatisfied false, wrapped, isSatisfied . , , AcknowledgeException() isSatisfied. , , , AcknowledgeCoruption() , . , .
I'm not sure what the best architecture will be, but providing the means by which exceptions can indicate to what extent the state of the system is corrupt or intact will be of great importance in alleviating problems with existing architectures.