Re: 64-bit integers and 64-bit string length patch is ready to be merged
| From: | Andrea Faulds | Date: | Fri, 22 Aug 2014 14:52:08 +0000 |
| Subject: | Re: 64-bit integers and 64-bit string length patch is ready to be merged | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-76812@lists.php.net to get a copy of this message | ||
On 22 Aug 2014, at 08:10, Matteo Beccati <php@beccati.com> wrote:
> On 21/08/2014 19:42, Andrea Faulds wrote:
>> * IS_LONG/long - 32-bit or 64-bit integer (machine-dependant)
>> * IS_BIGINT/bigint - arbitrary-size integer
>> * IS_BIGINT_OR_LONG/integer - either a long or a bigint (pseudo-type)
>>
>> Replacing IS_LONG with IS_INT kinda ruins my naming scheme. The intention is that
>> “integer” and “int” are synonyms for “long or bigint”. However, if internally an int is
>> one thing and to userland it’s another, that would be problematic. If this goes through, I’d
>> probably make my bigints patch rename IS_INT to something new again, probably IS_SMALLINT or even
>> back to IS_LONG.
>
> wouldn't the following work for you?
>
> * IS_INT
> * IS_BIGINT
> * IS_INT_OR_BIGINT
>
>
> After all, SQL has INT(EGER) and BIGINT, albeit with different meanings.
> In fact "bigint" itself to me and possibly many other developers means a
> 64bit int, not a GMP int.
It’s doable, it’s just confusing. From userland, “int” can be either IS_INT or IS_BIGINT.
I’d rather it was IS_LONG or something.
--
Andrea Faulds
http://ajf.me/