Re: Short-circuit warning

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

Jason Gade 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. As is the process
> > of hiding side-effects within if statements. An if statement is a condition
> > testing statement, and just because you CAN hide assignments within it
> > hardly
> > makes for clear coding and good practice.
> > So please stick with short-circuiting if statements and recommend that users
> > do actually read the original Euphoria documentation first.
> 
> No one is talking about doing away with short circuiting. We're talking about
> whether there should be a warning in the short circuiting case.

I misunderstood what was being said then. In which case I agree with the 
contributer who thought up a whole pile of silly warnings. That could be
economised with a single one:
    warning: This language follows the documentation.
I have one concern. Don't break existing code. After that almost any change
can be considered and maybe implemented.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu