Barriers to decimal literals (redux) (was Re: SI scale factors alone, without units or dimensional analysis)

On 26 August 2016 at 23:34, Chris Angelico <rosuav@gmail.com> wrote:
The most likely candidate for an actual Decimal literal is fixed precision decimal128 - the context dependence of the variable precision decimals currently in the standard library is fine for a custom class, but would be incredibly unintuitive for something that looked similar to a float literal or an int literal (assuming we could get it to work sensibly in the first place). However, actually implementing that would be rather a lot of work, for an unclear pay-off, as the folks that really need decimals seem happy enough with the variable precision ones (especially following Stefan Krah's creation and contribution of the C accelerated implementation), and the vagaries of binary floating point are going to be a factor in the computing landscape for many years to come even if programming language designers do end up collectively settling on decimal128 as the baseline type for decimal data processing. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (1)
-
Nick Coghlan