> > The LIST/SCALAR/VOID distinction is always the second value returned
> > (see the examples in the RFC). So your dispatcher is:
> >
> > my $func = lc (want)[1] . "_func";
> > return &$func(@_);
>
> I think I'd much rather it be the first. This seems to jive much more
> closely with what I'd expect:
>
> $want = want; # What do I want?
I have thought this through fairly thoroughly and discussed it
with others. The first return value should definitely be the
expectation count.
> Plus, in one email I suggested this
>
> if (want(want(want))) { }
>
> To backtrace context, but you said that this was impossible because
>
> want want;
>
> Should always return true.
If I said that, I was mistaken. It will always return false because
the first return value from C<want> is an expectation count, so:
want(want)
is something like:
want(1, SCALAR, LVALUE);
which fails because "1" is never a valid context.
> There's nothing claiming that when called with an argument the return
> list has to be the same as when not called with one.
There is *NO WAY* I'm proposing what amounts to:
($expectation_count, $main_context, @other_contexts) = want 'LIST';
($main_context, $expectation_count, @other_contexts) = want;
That's just evil! ;-)
Damian