in reply to Re: Get DoB Bounds from Age Range
in thread Get DoB Bounds from Age Range
Thank you for your comments. I have improved the variable names. I have a bad habit of using very short variable names for small functions and things that won't be used very long.
However, I felt that your suggestions for default values would lead to unexpected results (that would also be difficult to understand) in the form of a valid query input that would give results that were obviously not what was intended.
Also, setting the default for maxage would remove the ability for users to provide just one age and get valid results (by having the function copy the minimum to the maximum).
I also decided, based on this thinking, to die instead of returning undef, because if the user is calling this function without parameters, how can we trust them to check for an undef return before passing it into the query? ;)
Thank you for your help in improving this function.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Get DoB Bounds from Age Range
by wrog (Friar) on May 07, 2015 at 17:57 UTC | |
by over2sd (Beadle) on May 08, 2015 at 01:39 UTC | |
|
Re^3: Get DoB Bounds from Age Range
by jeffa (Bishop) on May 07, 2015 at 17:38 UTC | |
by over2sd (Beadle) on May 07, 2015 at 21:40 UTC |