Re: Short-circuit warning
- Posted by Andy Drummond <andy at kest?eltele.co?> May 20, 2008
- 641 views
Derek Parnell wrote: > > Andy Drummond wrote: > > > > When I first used Euphoria the docs DID describe the short-circuiting > > process. > > It was very clear, and made coding easier with things like: > > }}} <eucode> > > if atom(res) or length(res)=0 or res[1]='+' then > > do something > > end if > > </eucode> {{{ > > To do that with three nested if statements would be silly. > > By the way, it used to be that short ciruiting was significantly slower than > coding multiple IFs. I don't know if that situation has changed or not. > > I never tested it but I always assumed that it had to be quicker; in effect the short-circuit is just a paraphrase for the multiple-if method. Strange! That's one reason I wanted it kept - though I gather there is no suggestion that it should go. I evidently misunderstood what some people were saying! > -- > Derek Parnell > Melbourne, Australia > Skype name: derek.j.parnell