Other notes

Bill Baxter dnewsgroup at billbaxter.com
Sat Nov 24 13:54:14 PST 2007


BCS wrote:
> Reply to bearophile,
>> 4) Every language feature adds complexity to the compiler, makes the
>> language manual longer, requires programmers to remember more things,
>> etc. So every language feature has to be kept only if enough people
>> use it, without a good way to replace it, etc. I like D real type, but
>> so far I have't found a situation where double can't solve my problem.
>> So who of you is using the real type? If there isn't enough people
>> using it then it may be removed from the D specs.
>>
> 
> I only use real. On most, if not all, systems it's just as fast as 
> double (OK it needs more IO time but...) so why not use it?

You answered the question right there.  More memory means occupies more 
cache, more disk etc.  I basically only use real for intermediate 
temporaries where I might want to keep a little more precision.

I basically never store reals or pass them between functions. 10 bytes 
is kind of a weird size for alignment-sensitive things too.

But I don't think it needs to be removed from the specs.  It's neat you 
can get at it when you need it.

--bb



More information about the Digitalmars-d mailing list