Reply to post: Re: mumbo jumbo

Turing Award winner Barbara Liskov on CLU and why programming is still cool

Richard 12 Silver badge

Re: mumbo jumbo

Especially when the entire stack from software to hardware works on exceptions, which may leave undefined state left and right

No, it may not. Any function/method that leaves undefined state around after a recoverable error is simply broken. All error signalling systems require this cleanup to be done, and exceptions make cleanup far easier because the language guarantees certain things will happen in a specific order when an exception is thrown.

So you've actually got somewhere to put that cleanup - such as a destructor or "finally".

You can write terrible code in any language.

Irrecoverable errors are different of course, and again exceptions help there as it gives you a single global place to catch all irrecoverable errors and package up some kind of fault report so maybe you can make it recoverable in future, or avoid the irrecoverable state entirely.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2022