overloading operators for I/O
    Walter Bright 
    newshound at digitalmars.com
       
    Wed Feb 14 14:42:56 PST 2007
    
    
  
Manfred Nowak wrote:
> Walter Bright wrote
>> You see some code:
>>
>>      x = a + b;
>>
>> and what do you think? I think "add a and b, assign the result to
>> x"
> 
> What one thinks depends on the education.
Of course. I assume here a computer programming background, where the 
conventional meaning is, well, conventional. We can relate this to the 
Lisp thread here, where (1- x) means x-1. The unconventionality of the 
Lisp syntax makes it a hard sell.
> Please be aware that also D currently breaks your thinking:
>   
>   x = b;
> 
> can currently assign a value to b. This contradicts your statement 
> above.
I disagree, because this is in the context of computer programming, not 
abstract algebra. C++ stands out alone in its use of << for such, and is 
therefore unconventional.
    
    
More information about the Digitalmars-d
mailing list