I actually got that idea from my CSV Database Validation program. For that, you can specify a regular expression as a "data type" for a database field. In thinking about this more, I realized that by arbitrarily passing in subroutines to validation routines, rather than try to hard-code methods that cover every possible case, I can let the programmer specify those in advance via sub references. It seems like a much more powerful system, the code is shorter, and you only build what you need.
I do agree with you about the failings of parameter lists. Design by Contract seems to be one attempt to get around this weakness.
Cheers,
Ovid
New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)
In reply to Re: Re: RFC - Parameter Objects
by Ovid
in thread RFC - Parameter Objects
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |