On Fri, Jan 24, 2003 at 10:15:48AM -0800, Brent Dax wrote: > Dan Sugalski:
> # 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? > > 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). What? A junction of all the possible contexts valid here? <ducks> Nicholas Clark
