POV-Ray : Newsgroups : povray.off-topic : C++ structuring help.... : Re: C++ structuring help.... Server Time
10 Oct 2024 23:17:34 EDT (-0400)
  Re: C++ structuring help....  
From: Warp
Date: 22 Mar 2008 14:31:18
Message: <47e55e85@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.