--

On Thu, 26 Sep 2002 14:06:50  
 John Williams wrote:

>We should respect default values if arrays can declare them.
>
>Perhaps there will be a modifier for operator declarations to declare what 
>the default behavior should be.  Otherwise I don't know how different 
>behaviors for different operators would be possible, especially for 
>user-defined operators.

Having an operator force some very narrow kind of 
context to control what the list returns is very 
strange. The list should respond in some generalized 
way (undef or whatever the list is set to pretend is 
undef) and have the operator choose how to respond to 
that, and return whatever it deems to be the "result" 
of the operation. Under this mechanic the only tricky 
part is figuring out when the list is exhausted and 
when it is passing the autoviv value legitimately.

Related note, if we can define default values for a 
list, is that a compile time or runtime property. I 
confess as to not knowing quite how to tell. I would 
hope it was runtime for the syntax alone:

@users but autovivs ("Anonymous User");

-Erik


>   sub operator:foo is hyper_default(1) ...
>I agree with "Blech", but we can procrasticate doing it at least until
>Damian makes it clear how operators will define their behavior.
>
>Otherwise, a contextualized undef (0 in numeric context, '' in string) 
>would seem DWIM to me.  
>
>I wouldn't want to throw tons of warnings from one operation, so maybe 
>hyper-operating on unequal lengths gets a new warning, instead of throwing 
>lots of 'undefined value' warnings.
>
>~ John Williams
>
>


Is your boss reading your email? ....Probably
Keep your messages private by using Lycos Mail.
Sign up today at http://mail.lycos.com

Reply via email to