Bron Gondwana wrote:
> 
> In [EMAIL PROTECTED], you wrote:
> >   count = array;               # scalar context because of assignment to
> >   scalar.
> >   alt_array[] = array; # list context
> 
> and if array is a subroutine?
> 
>    count = array();
>    count = &array;  # warning - special meaning in p5.
> 
> Either would be just as messy - and I like being able to say:

Either would be just as messy as what?

> 
> my $thingy = $object->subobject->value;
> 

I must not understand.  Your example here strikes me as
unrelated/unaffected.

> > I'm not the linguist that Mr. Wall is, but it strikes me that context should be
> > derrived automatically as much as possible.
> >
> > An slightly different alternative would be that arrays and hashes are always
> > referred to with their trailing indicator ([] or {}). So, from the example
> > above, you'd have
> >
> >   count=array[];
> >   alt_array[] = array[];
> 
> Yuck.  Ugly as thingywhatsit, though it does have the advantage of making
> syntax like array[2..5] for splice...

Ugly?  What makes it ugly (to you)?  Just having to type an additional
character?
Do you have a better suggestion for separating variable type from
context?

> 
> Um, don't know about hash{[a-c].*} though (apply regular expression and only
> keep keys that match)
> 
> --
> Bron ( but I don't think the ugliness is worth it in the end.. )

-- 
David Corbin            
Mach Turtle Technologies, Inc.
http://www.machturtle.com
[EMAIL PROTECTED]

Reply via email to