Re: RFC 212 (v1) Make length(@array) work

2000-09-14 Thread David L. Nicol
> > All I'm doing is suggesting another way, one that makes more sense for > beginners: > > $a = length @b; > > I think we're going to have to see prototypes extended to cope with > functions like this, anyway. I'll mention this requirement in the > next version of the RFC. > > Nat Loo

Re: RFC 132 (v3) Subroutines should be able to return an lvalue

2000-08-29 Thread David L. Nicol
Perl6 RFC Librarian wrote: > With the enhanced C operator, subroutines can dynamically decide > what to return. With context-based polymorphism, the decision can be made staticly.

Re: RFC 128 (v1) Subroutines: Extend subroutine contexts to includename parameters and lazy arguments

2000-08-22 Thread David L. Nicol
> >> Is there any mileage in extending the syntax to allow the contents >> of an array or hash to be checked. In general I find quite often >> that I am checking to make sure that an array has at least N >> elements (ignoring issues with sparseness) and that a hash has a >> s

Re: RFC 118 (v1) lvalue subs: parameters, explicit assignment, andwantarray() changes

2000-08-22 Thread David L. Nicol
With a tied scalar, does perl5 access its routines twice when it does a += ? I think the lvalueable subroutine should get called twice in the example, first the left-hand and then the right-hand Nathan Wiger wrote: > > Damian Conway wrote: > > > > The lvalue accessor *shouldn't* be d

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-21 Thread David L. Nicol
>From rfc 98: > =head2 acceptable coercions > > When resolving which method C to call in a context CTXT, and there > is no method C defined for the context CTXT, Perl will examine > the types listed in C<@CTXT::ISA{OVERLOAD_CONTEXTS}> for a list > of other contexts > to see if C can produc

Re: RFC 132 (v1) subroutines should be able to return an lvalue

2000-08-21 Thread David L. Nicol
Perl6 RFC Librarian wrote: > > As a thought guide: think of C returning a reference to its > argument, and the call to lvsub() performing a dereference. Thought guide? Given a macro language and reference reasonablizing, this looks like you've just compeltely defined lreturn! macrod

Re: RFC 97 (v1) prototype-based method overloading

2000-08-16 Thread David L. Nicol
Graham Barr wrote: > > I would add to that, that as long as the addition of this does not effect > the performance of calling the methods that want the "relaxed perl5-ish" > semantics. > > Graham. The IMPLEMENTATION of the rfc97 working document (unfortuneately not web accessible, I may chang

Re: RFC 98 (v1) context-based method overloading

2000-08-14 Thread David L. Nicol
It will run faster, because it doesn't have to evaluate the want(). (97,98) doesn't invalidate the current way of doing things, it just gives a new way. And in syntax that is currently erroneous. Nathan Wiger wrote: > > > And what will aSub decide is it's context? > > > > @foo = (1

Re: RFC 98 (v1) context-based method overloading -- ambiguity resolution

2000-08-14 Thread David L. Nicol
Hildo Biersma wrote: > > > The other way C++ allows you to overload a named function is > > by return type. This document is a companion piece to > > a similarly named one about protoypes. It replaces old Perl's > > "wantscalar" and "wantarray" kluges, which can now be deprecated, > > with a cl