Is all this Invarient **** er... stuff, premature optimisation?
    Lionello Lunesu 
    lionello at lunesu.remove.com
       
    Tue Apr 29 02:50:51 PDT 2008
    
    
  
"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:48169E90.6050700 at digitalmars.com...
> Me Here wrote:
>> Janice Caron wrote:
>>> Functions don't overload on return value.
>> They don't? Why not? Seems like a pretty obvious step to me.
>
> Type inference in D is done "bottom up". Doing overloading based on 
> function return type is "top down". Trying to get both schemes to coexist 
> is a hard problem.
But a function's result can be overloaded using "out", so why can't it be 
overloaded using the return value?
Can't the compiler treat a return value as an implicit out argument?
L. 
    
    
More information about the Digitalmars-d
mailing list