POV-Ray : Newsgroups : povray.beta-test : Beta 37 and C++0x : Re: Beta 37 and C++0x Server Time
30 Jun 2024 17:41:21 EDT (-0400)
  Re: Beta 37 and C++0x  
From: Warp
Date: 30 May 2010 00:41:27
Message: <4c01ec77@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> Then you should file a bug report with Microsoft because their library (and 
> probably the compiler as well) enables non-standard behavior by default. 
> Supporting draft standard features by default is extremely poor practice, or 
> more precisely, a serious product defect. But it is of course typical M$ 
> behavior to pull such stunts and forget an off-switch, so you may have to 
> dig for it or patch your system library by hand <sigh>

  I'm curious to know what your excuse will be when the C++0x standard is
ratified and POV-Ray will stop compiling on *standard* compilers.

> > Why does the POV-Ray code blindly import whole namespaces anyway? There
> > is a reason why 'using namespace' statements are considered poor practice.

> POV-Ray's usage of C++ is fully ISO standard compliant.

  "Standard compliant" and "good practice" are two different things.

  A program where every single variable is global to the entire program and
named like var00001, var00002, var00003... would be "standard compliant",
but that doesn't mean it has good design.

  Avoiding "using namespace std;" is a good practice because it avoids
precisely the kind of problems as presented here.

> If and when there 
> will be an approved new version of the ISO C++ standard, POV-Ray source code 
> will be made compatible. It is pretty pointless to chase a draft standard 
> with any production source code, that would be miserable practice, as is 
> demanding such compatibility.

  Exactly what would be the problem in avoiding "using namespace std;" and
using the 'std::' prefixes? It's not like POV-Ray needs to be compilable in
20-years-old compilers anylonger (it requiring boost and all).

-- 
                                                          - Warp


Post a reply to this message

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