We need to clarify if 'real' is the 'default floating point type' or not.

Lionello Lunesu lionello at lunesu.remove.com
Mon Mar 3 17:28:19 PST 2008


D should establish some kind of politburo. A group of elders, each with his 
(..her?) own problem domain. Don should clearly govern the floating point 
aspects of D and just get to do what he thinks is best. : )

To me, this 'real' problem sounds a lot like the 'int' problem: why should 
'int' be established as the default integral type, when it is inefficient on 
64-bit hardware (and on 16-bit, 8-bit, .... )?

D's very proud of having fixed sized types, and rightly so, but there 
clearly are situations where size doesn't matter, and shouldn't matter. Of 
course, there's a minimum limit, when any smaller would just be ridiculous. 
...uh... nevermind.

So I think we should have 2 new aliases. One for a default int (at least 
32-bit) and one for a default float (at least double). On X86/87 these new 
aliases would map to int and real respectively.

Coming up with good names without silly adjectives/underscores will be 
difficult, though. I, for one, can't come up with any names that 'have it in 
them' to replace the omnipresent 'int' and 'real'...

L. 




More information about the Digitalmars-d mailing list