Boost logo

Boost :

Subject: Re: [boost] Cxx dual library
From: Rob Stewart (rstewart_at_[hidden])
Date: 2016-06-04 21:28:10


On June 4, 2016 2:01:25 PM EDT, Edward Diener <eldiener_at_[hidden]> wrote:
>On 6/4/2016 12:16 PM, Vicente J. Botet Escriba wrote:
>> Le 03/06/2016 à 18:46, Edward Diener a écrit :
>>> On 6/3/2016 11:51 AM, Vicente J. Botet Escriba wrote:
>>>> Le 03/06/2016 à 12:58, Edward Diener a écrit :
>>>>> On 6/3/2016 1:54 AM, Vicente J. Botet Escriba wrote:
>>>>>> Le 03/06/2016 à 01:26, Edward Diener a écrit :
>>>>>>> On 6/2/2016 5:40 PM, Vicente J. Botet Escriba wrote:
>>>>>>>> Le 02/06/2016 à 20:55, Edward Diener a écrit :
>>>>>>>>
>>>>>>> I am not as afraid of macros as you appear to be.
>>>>>> I'm not afraid of macros. In general I prefer to don't use them
>when I
>>>>>> can use an alternative solution.
>>>>>
>>>>> I am with you if the alternative solution is easy to use. But when
>it
>>>>> involves a great deal of work on the end-user's part I think a
>>>>> macro-based solution is OK.
>>>> There is no more work on the user's side but on the developer's
>side.
>>>> And for the user it is better to don't use macros as far as
>possible.
>>>> Could you describe what the user need to do in addition?
>>>
>>> I do not agree with a blanket statement of:
>>>
>>> "And for the user it is better to don't use macros as far as
>possible."
>>>
>>> It is only better to not use macros when an equally viable and easy
>to
>>> use solution is available.
>> How my approach is worst for the users?
>>>
>>> I do not understand what you mean by:
>>>
>>> "Could you describe what the user need to do in addition?"
>>>
>> You said : "But when it involves a great deal of work on the
>end-user's
>> part I think a macro-based solution is OK."
>> My approach don't request anything additional respect to a macro
>solution.
>
>I am sure I said that when an alternative involves a great deal of work
>on the end-user's part I think a macro-based solution is OK. Please
>read what I said again.

Edward, you've missed that Vicente doesn't see that importing either a Boost or a Standard Library solution, into a common namespace requires anything more of the user.

The user would always use the new, common namespace name for something, regardless of its original namespace. For example, foo::x is the common name, but x may have been introduced into the foo namespace, by a using directive, from the boost or the std namespace.

In the end, the user always includes the foo header and uses the foo name. There are no macros in the user's code. Both solutions select one implementation or the other. Yours refers to the namespace of the selected implementation with a macro, while his just uses namespace foo.

___
Rob

(Sent from my portable computation engine)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk