ow Integers Should Work

Timon Gehr timon.gehr at gmx.ch
Mon Dec 5 09:30:33 PST 2011


On 12/05/2011 06:25 PM, Andrei Alexandrescu wrote:
> On 12/5/11 10:37 AM, Don wrote:
>> On 05.12.2011 14:31, bearophile wrote:
>>> Found through Reddit, two blog posts about how integers should behave
>>> in system languages (with hardware support):
>>>
>>> http://blog.regehr.org/archives/641
>>> http://blog.regehr.org/archives/642
>>>
>>> Bye,
>>> bearophile
>>
>> Not very convincing, since he proposes a change to existing
>> architectures, and seems completely unaware of the overflow flag.
>> If you can change existing architectures, why not simply allow an
>> exception to be generated if an overflow occurs?
>>
>> Doesn't seem at all helpful to D.
>
> Agreed. One thought that comes to mind is using the small int
> optimization for BigInt, i.e. use no dynamic allocation and built-in
> operations whenever possible if the value is small enough. Does BigInt
> currently do that?
>
> Andrei

It does not.


More information about the Digitalmars-d mailing list