Re: Small feature request for future EU versions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
> That really surprises me. I was thinking that different symbols for
> different operations (comparison vs. assignment) would lead to clearer
> code and less pitfalls -- compared to Euphoria's '=', the meaning of
> which dependes on the context.

Consider the following C code:

    if (A = B) {
        printf("A is equal to B");
    }

Every C programmer will eventually have a 3 hour debugging
session (and probably on several different occasions), where he 
finally realizes that the above code is actually doing:

    A = B;
    if (A != 0) {
        printf("A is equal to B");
    }

Not only is the if-statement "wrong", but A is overwritten by B! 

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu