Darren New <dne### [at] sanrrcom> wrote:
> Warp wrote:
> > There are a few cases where a global instance may be more practical than
> > harmful.
> Yeah. Kind of like "goto". :-)
I disagree. I have been writing C++ for hobby and professionally for
over 10 years, and the total amount of C++ I have written is probably
closer to 100k lines of code. I don't remember *ever* writing even a
single "goto".
It's not like I avoid it. I just don't need it. (Usually good basic
encapsulation takes automatically care of anything that would be an
"acceptable use of goto" otherwise.)
Global variables (inside namespaces or not) is not something I have used
a lot, but I have a few times. I believe I can rationally argue for the
rationality of each one.
--
- Warp
Post a reply to this message
|