Re: [PHP-DEV] 64-bit integers and 64-bit string length patch is ready to be merged

[email protected] (Andrea Faulds)
Newsgroups php.internals
Message-ID <[email protected]>
On 22 Aug 2014, at 08:10, Matteo Beccati <[email protected]> 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.