[haiku-commits] Re: haiku: hrev48216 - src/apps/showimage src/kits/shared headers/private/shared

  • From: Augustin Cavalier <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 4 Nov 2014 15:33:51 -0500

On Tue, Nov 4, 2014 at 3:28 PM, Adrien Destugues <pulkomandy@xxxxxxxxx>

> Imagine some app is compiled using BToolbar today (without BPrivate).
> Now it has references to the BToolbar class. It links it statically so
> it runs and there is no problem.
> We continue tweaking BToolbar and chanfging it a bit in ways that break
> binary compatibility. The app isn't affected because it still links its
> own version and doesn't see the new one in libshared (which is static
> precisely to allow this)
> But someday we move BToolbar to libbe. The app links against that, so it
> is now confused because there are two different BToolbar classes around.
> To avoid this, we put everything in libshared into the BPrivate
> namespace. We remove that at the same time as we move things into libbe.
> This makes sure old apps compiled against libshared don't hit a conflict
> with the final version of the class published in libbe.
> Finally, the "using namespace" makes it possible to recompile the app to
> use the final version of the class with no changes to its sourcecode.

Ah, makes a lot of sense.

I'll submit a patch to fix that next chance I get.


Other related posts: