Re: welcome to the emelFM2 mailing list

David Jensen wrote on Tue, 13.04.2004:

> here is offending code:
> 
>                                   goto nospans;
>                                }
>                              ps = ss;
>                           }
>                         if (ps)
>                            ps->next = s;
>                       nospans:        
>  >error here       }
>                 }
>               if (i == y2)
>                  goto nolines;
>               i += step;
>            }
>        nolines:
>  >this fixes  ;       /* added semicolon */
>       }
> 
> Note: your code does not have the error, but shame on you, gotos? :)

well, i know, there's this story that gotos are all evil, but did you
ever try to grep for goto in the gtk sources?

grep -R "goto.*;" gtk+-2.4.0/gtk |wc -l
165

i think, sometimes, gotos can increase readability of the code,
if the number of code lines would increase a lot without them.

btw, the eggcellrenderer isn't my code, i took it from libegg and
the mg-cell-renderers are from mrproject, but i use a few gotos in the
new mkdir dialog. :)

do you have a good comparision of pros and cons for using and not using
gotos?

regards, 

        tooar


-- 
What difference does it make to the dead, the orphans, and the homeless,
whether the mad destruction is brought under the name of totalitarianism
or the holy name of liberty and democracy?
        - Gandhi

-- 
Users can unsubscribe from the list by sending email to 
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by 
logging into the web interface.

Other related posts: