Re: = vs := and = vs ==

new topic     » goto parent     » topic index » view thread      » older message » newer message
ChrisB said...
jimcbrown said...

Even if we continue to refuse to allow assignment in the middle of evalutions, we could still have the new symbols, but then

if a := b+c then 

would just throw a syntax error. That leaves open the possiblity of using new symbols for the sake of reader's clarity.

if a = b+c then d := e+f end if
vs
if a = b+c then d = e+f end if
or
if a := b+c then d := e+f end if
would always evaluate to true,

Uh, no, the last one would throw a syntax error at you. You'd get file and line number and everything.

ChrisB said...

I don't care if they're assignments or comparisons, the syntax takes care of it, but I would have to if I was forced to be more specific, which for me adds another layer of detail I can just do without.

Cheers Chris

Hmm. That's a good point. On the other hand, it's already worse via = vs equals()...

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

Search



Quick Links

User menu

Not signed in.

Misc Menu