<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - get rid of prex.h / postx.h wrapper headers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=82577#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - get rid of prex.h / postx.h wrapper headers"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=82577">bug 82577</a>
              from <span class="vcard"><a class="email" href="mailto:bjoern.michaelsen@canonical.com" title="Björn Michaelsen <bjoern.michaelsen@canonical.com>"> <span class="fn">Björn Michaelsen</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=82577#c3">comment #3</a>)
<span class="quote">> One thing that we need consensus on is whether to use a "real" C++ namespace
> or a "C-style" one, i.e. just prefixing the conlicting LibreOffice type
> names with some short string, like "Vcl".</span >

IHMO C++ namespaces as its better for tooling, e.g. doxygen:

 <a href="http://docs.libreoffice.org/sw/html/namespaces.html">http://docs.libreoffice.org/sw/html/namespaces.html</a>

<span class="quote">> I guess the C++ namespace would be better from a C++ orthodoxy point of
> view, but what should the namespace be? "vcl::" ? "org::libreoffice::vcl::"
> (brrr)?</span >

No, not a java-like "lets prefix my full home address" thing. We already have
"com::sun::star::" as our public API. There were discussions of aliasing that
as "libreoffice::" (llunak wanted something like that IIRC).

For our private/internal API, having "vcl::Foo" should already be less risky
than "VclFoo" -- and in the long term, if needed, we could move "vcl::" to
something-like "libreoffice::private::vcl::" or "libreoffice::internal::vcl::",
when there are conflicts. It will be a lot easier to move a namespace than to
rename hundreds of classes.

<span class="quote">> In any case, we *don't* want to repeat the current disaster of
> inconsistent "using" declaration, varying from one source file to another.</span >

IMHO that is mostly a symptom of having  unmanageable 10KLOC or more per source
file, so that its not easy to see what a using (or #include for the matter) is
for and thus they are rarely touched and just grow.

<span class="quote">> Would using a C++ namespace have the benefit that it would be enough to just
> add a "using namespace vcl" (or whatever) in some header, and only those few
> source files that actually refer to the identically-named X11 types would
> need to add a :: prefix to those?</span >

using in header files is so harmful that most coding styles disencourage it,
e.g.  Sutter/Alexandrescus "C++ Coding Standards" rule 59: "Don’t write
namespace usings in a header file or before an #include."
<a href="http://stackoverflow.com/questions/5849457/using-namespace-in-c-headers">http://stackoverflow.com/questions/5849457/using-namespace-in-c-headers</a>

Anyway, this is more of a discussion for the mailing list or the ESC, lets take
it there if there is further need.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>