note
Anonymous Monk
Let's not confuse the want of better parameter checking with getter/setter duplication. Yes, combining the two is (IMHO) bad form, but in general I write OO without getter/setters anyhow, since this is sort of exposing implementation details and it shouldn't be done that way most of the time.
<P>
Ruby gets along fine with duck typing. I'm really not concerned there, and I'm not sure perl should be either. I guess the thing is when something is method-oriented, you'll run across the equivalent runtime error a bit sooner, as with Perl you have a good chance of only getting something like "not a HASH at (xxxxxx)".
<P>
The advantage of duck typing is that if you suddenly decide that your FrogBucket needs to accept Weasels, all you need to do is make your Weasels know how to quack().
412554
412554
16