Why is it that no one writes with portability in mind in druntime?

Shammah Chancellor anonymous at coward.com
Sun Nov 24 09:50:20 PST 2013


On 2013-11-24 17:47:49 +0000, Andrej Mitrovic said:

> On 11/24/13, Johannes Pfau <nospam at example.com> wrote:
>> We have one type in D which has a different size depending on platform
>> and it's the number one source for platform-specific problems...
> 
> It seems any time a language defines something as
> implementation-specific or platform-specific it ends up giving
> everyone headaches. I don't know why D chose to use reals like that,
> after enforcing the sizes of long/int/etc. types.

Having 80-bit reals on platforms that support them are helpful for 
numerical simulations.  There use to be an article about this decision. 
 However, phobos should never use real for this reason.  It should only 
be used by application developers.   Maybe a compiler flag to error 
when compiling code that includes real to make sure portable libraries 
don't use it?

-Shammah



More information about the Digitalmars-d mailing list