>         expr1 && expr2
> 
> ...and detects that the LJ is overloaded, it could replace it with:
> 
>         user_defined_and( sub { $expr1 }, sub { $expr2 } )

Along the same line it would be useful to be able to overload the "truth
operator" (bad word, I'm sorry).  It's great to be able to do:
        
        if ($var1 && $var2)...

But if you also want to do:

        if ($var1)...

It should be the same as:

        if (user_defined_truth($var1))...

It's a natural extension and prevents you from having to do stuff like:
        
        if ($var1 && $true)...

        --Nate

Reply via email to