Proposal for a standard Decimal type in alpha
Andre Pany
andre at s-e-a-p.de
Fri Dec 22 11:27:21 UTC 2017
On Friday, 22 December 2017 at 08:32:03 UTC, Nathan S. wrote:
> I think it would be clearer if the precision, the rounding
> mode, and the error behavior were three separate parameters
> instead of a single Hook. Predefined settings named "Abort",
> "Throw", and "NoOp" would then be self-explanatory, and it
> wouldn't be necessary to entirely rewrite them if you wanted
> precision of 10 or 20 decimal digits instead of 9 or wanted to
> use a different rounding mode.
I agree. I worked with languages which have decimal type built
into the language
(DATA price TYPE p LENGTH 16 DECIMALS 2)
and having the possibility to set precision and scale directly
without have to think about rounding options would be great.
Kind regards
Andre
More information about the Digitalmars-d-announce
mailing list