T
Tom St Denis
Yes, often simple functions can be implemented as macros. I'm
advocating that they not be implemented as macros, because macros
have too many well-known pitfalls, that you surely are aware of.
You are advocating the opposite, but it isn't clear why. Why?
Assuming you wrap your macro with the appropriate do { } while (0)
style brace it should fit anywhere you don't need a return code.
I'm against putting code in a header file because it's just messy and
usually leads to disorganized code trees. [...]
Why would putting an inline function in a header file cause the
tree to be more disorganized than putting an equivalent macro in
the header file? I can see how an excess of either one could
cause problems, but I don't see how either one would cause more
disorganization than the other.Because it's just not where code should go.
I see ... and a Macro is not code because .. ??
Develop code how you want. I don't give a rats ass really. I'm
trying to offer some helpful advice from my experience as a software
developer. You're too prideful to either accept it or just graciously
decline it is YOUR OWN PROBLEM.
I'm not going to reply to you again in this thread.
Tom