Darren New wrote:
Andrew Lentvorski wrote:
At this point, I have been using both long enough that I am pretty convinced that exceptions are interchangeable with return codes.

You've used only some pretty lame languages, then.

Yes.  And?

I don't always get the choice to use a non-lame language.  ;)

Embedded hardware, for example, forces me to use a lame language quite regularly.

Anything with preconditions and postconditions (i.e., "design by contract") needs a different concept for exceptions in a way that return codes specifically can't be used to replace.

Correct. I consider both exceptions and return codes to be specific cases of what can be done with closures and continuations.

-a

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to