From: Dan Sugalski [mailto:[EMAIL PROTECTED]] > > Okay, I think I remembered the problem. Assume the following: > > list bar(int); # bar takes an int, returns a list > scalar bar(int); # bar takes an int, returns a scalar > > and also assume the following: > > xyzzy(scalar); # xyzzy takes a scalar > xyzzy(list); # xyzzy takes a list > > and then we make the call: > > xyzzy(bar(1)); > > Which bar do we call? And which xyzzy?
So the question is: if the calling context is ambiguous, do we dispatch to the implementation matching: 1) first valid signature w/ warning 2) most valid signature w/ warning 3) default calling context w/ warning 4) exception when ambiguous I'd take what's behind door number 1... Brent Dax wrote: > > This is also a problem with using want(). > > If we don't provide wants_scalar/wants_list, someone will > build it with want(), so we might as well try to address > it. I suggest that want() return a special value when > the calling context is ambiguous, and any wants_scalar/ > wants_list property be designed to accommodate this > (probably by specifying which one should be the default). Where "special value" is a junction: 'scalar' | 'list'? -- Garrett Goebel IS Development Specialist ScriptPro Direct: 913.403.5261 5828 Reeds Road Main: 913.384.1008 Mission, KS 66202 Fax: 913.384.2180 www.scriptpro.com [EMAIL PROTECTED]