Andrei's list of barriers to D adoption

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 6 11:55:22 PDT 2016


On Monday, 6 June 2016 at 18:36:37 UTC, Observer wrote:
> It's more complicated than that.  Part of what you need is to
> be able to declare a variable as (say) having two significant
> fractional digits, and have the rounding rules be implicitly
> applied when saving to that variable, producing an exact
> representation of the rounded result in storage.

Yes, but if you want accurate representation of two fractional 
digits on storage only, then it makes most sense to do all 
calculations on cents (scale everything by 100) and store as 
integers.



More information about the Digitalmars-d mailing list