in reply to Failure vs Undef

Wow. That's really nice. I've always hated overloading the meaning of undef or 0 (as you have to do in C). Having an explicit "failure" value makes life a lot nicer.

I'd be interested in more examples of using Failure, particularly P5 vs. P6.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: Failure vs Undef
by John M. Dlugosz (Monsignor) on Aug 31, 2008 at 21:18 UTC
    If you give me some ideas, I might elaborate on them.
      You gave several examples of P5 error checking, but didn't give the P6 version(s). Also, isn't there a way of telling the Failure object why the failure happened?

      My criteria for good software:
      1. Does it work?
      2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?