From: Leslie Viljoen Date: 2006-09-21T05:50:42+09:00 Subject: Re: Ducktator - A Duck Type Validator On 9/20/06, Robert Klemme wrote: > Leslie Viljoen wrote: > > Ah thank-you, that's great. But it would not work unless every > > execution path within the method receiving the object was executed: > > Well, yes. I didn't say it's perfect. :-) > > > ..so is there some magic that could overcome that limitation? > > You could make Probe significantly more complex so that it records invoked > methods and alters the return value between true and false or something else > etc. and goes on probing until no new execution sequences are found. I > guess this can soon get messy... Yes, it starts out as a nice idea. And while it's doing all that probing, who knows what side-effects it might be producing in that alien code?! Let me see, why not try: format_harddrive_if_input_above_5(probe) Whoops! Anyway, there are still places where it helps, I'm not complaining ;-) Les