|
Boost Users : |
Subject: Re: [Boost-users] boost and std collisons in c++0x
From: Sergey Sadovnikov (flex_ferrum_at_[hidden])
Date: 2009-02-05 14:55:20
Hello, Mickael.
Thursday, February 5, 2009 at 9:04:14 PM you wrote:
MW> Ein Held a écrit :
MW> This is very funny. In fr.comp.lang.c++, we had a troll about using
MW> usage. It appears that a lot of contributor use qualified names in
MW> professionnal code, to avoid namespaces collision and improve readness.
MW> Because when we use a string, I can need to know where it come from.
MW> That's an example.
MW> The second point we raised is the bad habit of beginners, who
MW> massively use the using namespace directive at global scope, and worst
MW> in header's global scope !
From the common point of view I completely agree with your opinion. But
now we are talking about fundamental language libraries. I think it
looks too strange if, for example, C# source code contains something
like:
System.String str = "blah-blah-blah";
System.Console.WriteLine(str);
//...
System.Collections.Generic.List<int> some_list = new
System.Collections.Generic.List<int>();
:) Because standard C# file template contains at least three usings
(System, System.Collections.Generic and System.Text)
Same for Java code. I mean what for other mainstream languages
'using declarations' are a common practice. And if we are talking about
beginners, in present time it is hard to explain why programmer have
to use full-qualified ids even for standard facilities. Of course
'because it is avoid namespace clash' is quite good explanation. But this
explanation looks too strange near other languages. In this case we
could get answer like this: 'Are C++ so worst and difficult if even
fundamental libraries are not easy-to-use and conflicts each other???'
-- Best Regards, Sergey mailto:flex_ferrum_at_[hidden]
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net