D and expression evaluation order.

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue May 1 05:00:58 PDT 2007


Manfred Nowak wrote:
> Bruno Medeiros wrote
> 
>> (it's the same in D) 
> | Comparison operators are no longer associative
> changelog for D 1.007
> 

Hum, you're right, I forgot about that, sorry.

So, going back to your original question:


Manfred Nowak wrote:
 > Bruno Medeiros wrote
 >
 >>    Evaluate operands in the same order as the associativity rule
 >>    of the
 >>    operator.
 >
 > You require all operators to have an associativity? Then what is the
 > associativity of the operators for comparison?
 >

Ok, I understand the question. Very well, let's use a different learning 
rule:

   All operands are evaluated left to right, with the exception of the 
assignment operators which are evaluated right-to-left.

I think it is even easier to learn than the previous one. Any problem 
with this one?


-- 
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list