Re: Integer operations are implementation-defined
| From: | Stas Malyshev | Date: | Wed, 03 Sep 2014 19:35:46 +0000 |
| Subject: | Re: Integer operations are implementation-defined | ||
| References: | 1 2 3 4 5 | Groups: | php.standards |
| Request: | Send a blank email to standards-+get-430@lists.php.net to get a copy of this message | ||
Hi!
>> Because they don't fit well together with the rest of the language,
>> and code right now almost certainly assumes integers are
>> fixed-size. To implement arbitrary-precision ints, something I'm
>> trying to do, you need to change the rest of the language, and
>> they'd break assumptions code currently makes.
>
> Basically, I don’t think they’d work well with how integers are dealt
> with generally in the language as it stands, and I suspect it would
> break existing code.
You mean, there's code out there that depends on the fact that integer
is converted to float on overflow? That would be pretty strange code,
could you give an example what such code would be used for?
It just seems strange to me to explicitly ban arbitrary precision ints,
especially as we don't put any actual limit on it, so you can not rely
on any specific limit even if you needed it.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/