At 12:40 PM -0700 9/26/02, Sean O'Rourke wrote:
>On Thu, 26 Sep 2002, Paul Johnson wrote:
>>  Is that sufficiently vague?
>
>Not vague enough, because the current implementation manages to miss the
>broad side of that semantic barn...

The intention is to allow aggregates to have different default return 
values, IIRC. Right now we return undef as the default, when 
accessing elements that don't exist, but there are cases where you 
might want something else. (Numeric-only arrays might want to return 
0, and string-only ones "", for example)

>Different operators doing different things sounds awful to me, because it
>makes it hard to predict what will happen, because new operators will have
>to be able to control what they do with their operands, and because new
>types of "array-like" operands will have to tell operators how to treat
>them.  Blech.

Well... no, not really.

I think this vagueness is my fault, as I badger Larry and Damian 
about it on occasion.

The reason it's vague is that the Right Thing depends on the types of 
the variables on either side of an operator. Multiplying two matrices 
should work differently than multiplying two multidimensional arrays, 
or two vectors, or a vector by a matrix.

We should get the default behaviour defined and in use so people get 
a handle on how things work, but we do want to make sure people keep 
in mind that it's the default behaviour, not the required behaviour.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to