POV-Ray : Newsgroups : povray.beta-test : Beta 37 and C++0x : Re: Beta 37 and C++0x Server Time
30 Jun 2024 17:37:03 EDT (-0400)
  Re: Beta 37 and C++0x  
From: Thorsten Froehlich
Date: 30 May 2010 05:43:12
Message: <4c023330@news.povray.org>
On 30.05.10 06:41, Warp wrote:
> 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.

POV-Ray will continue to compile on all compilers that are ISO C++ 1998 and 
2003 standard compliant. Academically designing for an unknown future 
standard would mean no program would ever be written as standards can change 
everything over time, and _do_ even *drop* features!

>> POV-Ray's usage of C++ is fully ISO standard compliant.
>
>    "Standard compliant" and "good practice" are two different things.

No, good practice is a superset of standard compliant.

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

No, even a fine grain use of namespace std will not solve the problem. You 
end up having to fully qualify all names, which could not be more pointless 
- it completely defeats the purpose of namespaces being meant as a 
simplification, not a complication, for the programmer.

>    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).

Formally the current standard-compliant way of accessing the std smart 
pointers is by accessing namespace std::tr1. The std qualifiers just add a 
lot of completely useless clutter to the code, seriously deteriorating 
maintainability. As nice as an academic code quality is, it is irrelevant in 
practice.

     Thorsten


Post a reply to this message

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