[ros-dev] Re: [ros-svn] [gdalsnes] 18113: -reorder InsertXscendingOrder macro argument order and update uses

Phillip Susi psusi at cfl.rr.com
Tue Sep 27 23:03:23 CEST 2005

I'd just like to chime in here with my opinion.  About a year ago I had 
the idea of introducing macros for error handling instead of explicit 
gotos.  We had some discussion on the matter, and I read several papers 
on the web, and came to agree that use of macros that change flow 
control is anathma.  It makes the code completely unreadable and 

At first it seemed like a great idea to hide the "nasty" gotos and have 
to type less while hammering out the code, but in the end, even when you 
are familliar with the macros, it looks ugly, and for someone who isn't 
familliar with the macros, it is utterly unreadable.

Recently I was reading over some apache code and they make extensive use 
of macros for flow control.  I found myself becoming frustrated to no 
end because I could not figure out what the hell was going on.  They 
looked like nice, neat function calls, but I could not for the life of 
me figure out where the code was that was being called.  It wouldn't 
have looked so deceptively simple if they coded out what was going on 
explicitly instead of using macros, but it would have been easy to 
understand, and why should something look deceptively simple when it 
really isn't?  That only leads to confusion when trying to understand 
what's going on under the hood.

More information about the Ros-dev mailing list