On 13 June 2016 at 19:03, Mattias Andrée <[email protected]> wrote:
> On Mon, 13 Jun 2016 18:18:39 -0400
> Calvin Morrison <[email protected]> wrote:
>
>> Quote:
>>
>> zdivmod Calculates the quotient and the remainder. This
>> is available because when you calculate the quotient you
>> get the remainder for free. zdiv and zmod simply call
>> zdivmod with the dummy variable as one of the output
>> variables.
>>
>> Why include a wrapper at all? Why not just allow the user
>> to access the function directly, allowing them to choose?
>> is this just for API use of ease?
>
> On a second read, I'm a little puzzled by your formulation:
>
>   Why include a wrapper at all?
>               ^
>   Why not just allow the user to access the
>                ^^^^^
>   function directly, allowing them to choose?
>                      ^^^^^^^^^^^^^^^^^^^^^^^
>
> Could you reformulate, preferable with explicit naming
> of the functions to avoid confusion?
>
> I first read this as:
>
>   Why include zdiv and zmod at all?
>   Why not just make the user call zdivmod
>   and discard the unwanted output?
>
> Is this what you meant?
>
> If so, after thinking about it, I think zdiv and zmod
> is important for ease of use when you first start using
> libzahl. For user's already familiar with libzahl it
> doesn't really make a big difference. So it's about
> weighting how it is to get started with libzahl and
> how much zdiv and zmod contributes too pollution. They
> don't really contribute to complexity. My personal
> opinion is that ease of getting start out-weights
> pollution reduction in this case, but I can be persuaded
> otherwise.
>
> For clarity: zdiv, zmod and zdivmod are all available
> in the API, and zdiv and zmod are wrappers for zdivmod.
>

Yes , you understood quite well. That seems acceptable to me for the
east of API use.

Reply via email to