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:

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

> 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...

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.. )

Reply via email to