P
Phlip
Shezan said:By using the '#define' macro, you're basically messing with the C++
type system and asking for trouble (in other places as well). Using
this instead:
Did you see the place where I wrote "If anyone finds an an issue with the
example, they'l be qualified to think of a similar one that generates the
same problem." ?
That's because MACROS SUCK!
Yet sometimes we pay our vendors to provide them.
My example is not the Alpha and Omega of 'const' placement. It merely shows
how const placement can't be called "_only_ a style question".
// t_rptr_ reminds me I plan to keep a handle on the argument.
I hate that kind of comment. There's no way for smart pointers to enforce
'new' (or have the Boosties found one?).
Fortunately no, English syntactical rules are a little tighter about
that then the syntax rules we're dealing with here. I think this is
why you see companies come up with those annoying coding guidelines,
so we spend less time busting each others chops over the nasty piece
of code they just wrote and more time actually producing something.
This is why programmers should own tasks and share modules. As programmers
edit modules they should intentionally move them closer to community
agreement.
Coding guidelines are a sick attempt to enforce one benefit of teamwork,
without the other benefits. Like less bugs.