Andrei's list of barriers to D adoption

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 6 14:28:14 PDT 2016


On 6/6/2016 1:56 PM, Observer wrote:
> On Monday, 6 June 2016 at 20:35:26 UTC, Walter Bright wrote:
>> What I've done, though I know that I won't convince any users of BigDecimal,
>> is use longs and have them represent pennies instead of dollars. Then they're
>> all exact to two places.
>
> I loaned out my copy of TDPL, so I don't have it nearby to
> check, but if that's your approach, you need to ensure that
> your underlying integral type is *always* 64-bits, not 32-bits.

D's long is always 64 bits.

> The reason is that otherwise, you've just limited your apps
> to handling a maximum amount of $21,474,836.48.

I wouldn't mind running into that problem :-)

> But banks
> can accept checks up to $99,999,999.99 (yes, they do have
> a limit, or at least they used to when I was working in that
> field).



More information about the Digitalmars-d mailing list