What features of D you would not miss?

Timon Gehr timon.gehr at gmx.ch
Sun Sep 18 07:50:38 UTC 2022


On 18.09.22 08:47, Nicholas Wilson wrote:
> On Thursday, 15 September 2022 at 08:40:22 UTC, Dukc wrote:
>> On Wednesday, 14 September 2022 at 05:58:53 UTC, Walter Bright wrote 
>> (on the thread about binary literals):
>>> On 9/13/2022 7:56 PM, Steven Schveighoffer wrote:
>>>> But it doesn't disprove the fact that *sometimes*, hex digits aren't 
>>>> as clear.
>>>
>>> Does sometimes justify a language feature, when there are other ways?
>>>
>>> People often complain that D has too many features. What features 
>>> would you say are not worth it?
>>
>> This is a good question, but would quickly derail the original thread 
>> from it's topic, so I decided to start a new one.
>>
>> What features could be removed from D if it were up to you? Please 
>> consider the breakage that would result from the removal, don't settle 
>> on thinking what shouldn't have been added in the first place.
> 
> real, specifically x86 80-bit,
> * its slow, you can't vectorise it
> * the extra precision isn't much use
> * use is often unintentional, and when it is the intention is almost 
> always misguided. If you have precision problems a couple of bits of 
> extra precision won't make up for a horrible convergence rate and if it 
> does, you probably need an arbitrary precision type anyway.

As someone who has had to hack 80 bit floating point support into C++ on 
Windows with inline assembly, I am glad it is supported. Unintentional 
use should be curbed though. Also, the added precision is more than a 
couple of bits and sometimes you just need that resolution. 80 bit 
floats are faster than arbitrary precision floats, so it provides a nice 
performance boost in that region, before you have to fall back on 
software solutions. (There is a trick where you use two or more doubles 
to represent a number with more mantissa bits though and it is possible 
that with AVX, performance may be competitive with 80 bit floats, but 
vectorising that code manually is more work.)


More information about the Digitalmars-d mailing list