in reply to Returning undef: The point I would like Damian to reconsider

I think "The One Rule" is that you must clearly document the return values of your methods or subroutines and expect the users to read the docs.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

  • Comment on Re: Returning undef: The point I would like Damian to reconsider

Replies are listed 'Best First'.
Re^2: Returning undef: The point I would like Damian to reconsider
by bibliophile (Prior) on Jun 26, 2007 at 13:58 UTC
    Hmm... would an all-encompassing "One Rule" be called the "One Rule to Ring Them All"...?
    :-)