Re: [dev] libzahl paper

From: Calvin Morrison <mutantturkey_AT_gmail.com>
Date: Mon, 13 Jun 2016 19:15:44 -0400

On 13 June 2016 at 19:03, Mattias Andrée <maandree_AT_kth.se> wrote:
> On Mon, 13 Jun 2016 18:18:39 -0400
> Calvin Morrison <mutantturkey_AT_gmail.com> 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.
Received on Tue Jun 14 2016 - 01:15:44 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 14 2016 - 01:24:11 CEST