Subject: Re: [PATCH 00/14] numparse module: systematically tighten up integer parsing

From: Junio C Hamano <[email-masked]>
Date: Wed, 18 Mar 2015 23:31:06 -0700

Michael Haggerty <[email-masked]> writes:

> Here were my thoughts:
>
> * I wanted to change the interface to look less like
>   strtol()/strtoul(), so it seemed appropriate to make the names
>   more dissimilar.

One reason I prefer the names in the compat-util is that it makes it
clear that what is converted into what (e.g. "str" to "ul") and what
type the result is stored ("i" or "ui"), and as an added bonus, with
a short-and-sweet "to" it is already so clear we are "converting"
that we do not have to use verbs like "parse_" or "convert_".  From
parse_i() and convert_i(), I cannot tell which one lacks the endptr
and parses to the end and which one takes the endptr and tells the
caller where the conversion ended (and it also does not tell us that
they are converting from a string).

> * The functions seemed long enough that they shouldn't be inline,
>   and I wanted to put them in their own module rather than put
>   them in git-compat-util.h.

I actually agree on this, but that is not a justification why they
have to be named very differently.

Having said that, I would say that it will be futile to discuss this
further, as we seem to agree to disagree.