Boost logo

Boost :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2019-10-29 09:55:08


On Tue, 29 Oct 2019 at 09:33, Olzhas Zhumabek
<anonymous.from.applecity_at_[hidden]> wrote:
>
> I believe I still need to adjust it to some stuff being moved to namespace
> detail, I'll try to do it this evening, which is in 5-6 hours. I'll try to
> run all tests locally as well so that I won't be hot-patching on the fly.

If you refer to the discussion from October 27, 2019
on https://gitter.im/boostorg/gil?at=5db545e9a03ae1584f1931e0,
then I'm not entirely convinced you need to do any adjustments.

As I said, the fact that

`auto x = gil::foo()`

means

`gil::detail::x_t = gil::foo()`

does not necessarily require moving `foo` into namespace gil::detail too.

I'm copying our conversation here for others (and the archive):

--------------------------------------------------------------------------------------
Olzhas Zhumabek @simmplecoder Oct 27 08:32:

should I hide my code under detail too, since it depends on the convolve_2d?
it is weird that in my PR the public interface returns class from detail

--------------------------------------------------------------------------------------
Mateusz Łoskot @mloskot Oct 27 10:00:

@simmplecoder It all depends on what "since it depends on class from
detail" mean, I think
Since it is about returning, then you and @lpranam rightly observe it smells
But, it also can be fine and indicate user that type is internal and
avoid using the type in own interfaces
While using instances of the type in user's code is perfectly fine

After all, `auto x = foo()` ignores the type, user does not have to
care type of x lives in detail
So, I'd not rush with hiding your code
I'd rather like to hear what others think, what @stefanseefeld thinks

@simmplecoder if you prefer to open an issue referenced to my PR
hiding the stuff, by all means, feel free to do so, mentioning me,
@stefanseefeld and whoever you'd like to consult.
Then let's discuss it there (you know here things are easily
overlooked, Stefan is not here all the time)
--------------------------------------------------------------------------------------

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net

Boost list run by Boost-Gil-Owners