POV-Ray : Newsgroups : povray.beta-test : Beta 37 and C++0x : Re: Beta 37 and C++0x Server Time
7 Jul 2024 12:20:50 EDT (-0400)
  Re: Beta 37 and C++0x  
From: Edouard
Date: 31 May 2010 18:40:00
Message: <web.4c0437ece947f53b3925073f0@news.povray.org>
"Fredrik Eriksson" <fe79}--at--{yahoo}--dot--{com> wrote:

> Why does the POV-Ray code blindly import whole namespaces anyway? There is
> a reason why 'using namespace' statements are considered poor practice.
> [...]
> Fully qualifying each and every reference to
> 'shared_ptr' (thank you, "Replace in files") of course fixes this
> particular problem.

I have to respectfully disagree - "using" statements, including "using
namespace", is not considered bad practice by everyone. Many experts feel that
"using" statements are in fact good engineering practice.

The beauty of the internet is that you can find as many experts as you want to
agree with any side of an argument.

I would argue that fully qualifying all types is much worse practice. Namespaces
are designed to manage these problems, otherwise you'd just embed all
definitions in a class called "std" instead. Namespaces give you more
sophisticated tools than your editors global find and replace dialog.

Cheers,
Edouard.


Post a reply to this message

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