Hi Andrew, I would say that gotos should be used very sparsely indeed. The most prominent case for their use is error handling. In this particular source code the "finalisation" is very much limited and uniform, so it can easily be handled with a (single) macro.
But what if the finalisation requires much more code? The definition of a macro for that could easily become unreadable (macros are after all simply text replacements, not pieces of code!). A categorical NO to gotos is - in my humble opinion - as harmful as an emphetical YES. Let us avoid gotos but not at all costs. Regards, Arjen On 2009-12-10 23:03, Andrew Ross wrote: > Alan, > > I notice your fix for the cppcheck detected issues makes use of goto's. In > many > circles use of goto is considered a real no-no. I'm not sure my fix of using a > macro for checking error codes and cleaning up is any better (see recent fix > to > lib/nistcd/cdexpert.c), but we should perhaps have a coding policy on such > things to go along with our style policy. > > Any thoughts from other developers? > ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel