Question/request/bug(?) re. floating-point in dmd

Walter Bright newshound2 at digitalmars.com
Thu Nov 7 12:22:18 PST 2013


On 11/7/2013 12:09 PM, John Colvin wrote:
> On Thursday, 7 November 2013 at 20:02:05 UTC, Walter Bright wrote:
>> On 11/7/2013 8:55 AM, Jerry wrote:
>>> What about something like the following?
>>>
>>> double x;
>>> double y;
>>> with (strictprecision) {
>>>   y = x;
>>> }
>>
>> That has immediate problems with things like function calls that might or
>> might not be inlined.
>
> it could apply only to operations on fundamental types within the region and
> guarantee nothing for any called code. It could even guarantee to not apply to
> any called code even if inlined. I think in practice this wouldn't be
> particularly inconvenient.

I think it would be very inconvenient, as it will make problems for use of 
generic code.

Also, it is too blunt - it'll cover a whole set of code, rather than just the 
one spot where it would matter.


More information about the Digitalmars-d mailing list