Andrei's list of barriers to D adoption

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 6 01:20:45 PDT 2016


On 6/6/2016 1:04 AM, Observer wrote:
> On Monday, 6 June 2016 at 07:01:33 UTC, Walter Bright wrote:
>> On 6/5/2016 11:38 PM, rikki cattermole wrote:
>>> On 06/06/2016 6:29 PM, Andrei Alexandrescu wrote:
>>>> On 6/6/16 6:17 AM, Andre Pany wrote:
>>>>> to be usable for companies which want to create economic software,
>>>>> in my opinion D lacks std.decimal.
>>>>
>>>> Do C, C++, Java, Go, or Rust have a standard decimal type? -- Andrei
>>
>> Apparently there's a spec: http://speleotrove.com/decimal/decarith.html
>
> There's been a lot of work on decimal floating-point types for
> C and C++, even if they haven't yet made it into the languages.
> See, for instance:
>
> http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1312.pdf
> http://open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3871.html

Interestingly, that contains links to open source C implementations, meaning we 
can just provide a D wrapper.

https://software.intel.com/en-us/articles/intel-decimal-floating-point-math-library/

http://speleotrove.com/decimal/decnumber.html

> and
> http://www.quadibloc.com/comp/cp020302.htm
> the last of which is not a standards-related document but
> provides some interesting detail.
>
> The point being, while decimal floats are something to be
> wished for, it's a complex matter, not something that can be
> quickly thrown together.
>
> That said, GNU C++ does provide some support:
> https://gcc.gnu.org/onlinedocs/gcc/Decimal-Float.html



More information about the Digitalmars-d mailing list