Perl6 RFC Librarian writes:
> There has been a proposed new core function C<want()>. this seems
> to be generally regarded as a good thing. Fine. If it is implemented
> we should use it. Offending functions (See RFC 37) should use
> C<want()> internally to determine what to return i.e; a list or a hash.

This implies that the internals can tell 'hash context' from 'list
context', which they current cannot.  Because Perl says you put a
list into a hash:

  $foo = func();        # scalar
  @foo = func();        # list context
  %foo = func();        # still list context

I'm very nervous about adding another context (isn't context confusing
enough already?) without good justification for it.  And this one
situation isn't justification enough.  You could easily say, as RFC 37
does, that the functions return key-value pairs in list context.

That'd make me happy.

Nat

Reply via email to