[Gnucash-changes] r13390 - gnucash/trunk/lib/libqof/qof - Implement QOF_COMMIT_EDIT_PART2 as a function instead of a macro.

Christian Stimming stimming at tuhh.de
Wed Mar 1 04:23:46 EST 2006


Derek Atkins schrieb:
>><aside>
>>BTW, this is only slightly less horrible than macros that use local
>>variables from their calling context.  The general rule is, "If it
>>looks like a function, it sure better behave like a function." (*)
>></aside>
> 
> See, I never make the assumption that Macro == Function, even
> if it looks like one.

Actually I do. (should we have a vote on this one? :) And as a reader of 
someone else's code I would actually prefer very much to not have macros 
affect the control flow of the calling function. So in this discussion I 
indeed agree with Chris' explanation: It might be a big convenience for 
the one who is writing the macro, but for the one reading the code it's 
a PITA and if at all possible it should rather be avoided... Basically 
I'd view this just as our ChangeLog policy: People might consider 
writing an extra ChangeLog entry a big inconvenience for them, but when 
reading someone else's commits, it's a substantial simplification for 
looking up particular changes.

Christian



More information about the gnucash-devel mailing list