Does D have too many features?

Andrew Wiley wiley.andrew.j at gmail.com
Mon May 7 00:22:52 PDT 2012


On Mon, May 7, 2012 at 2:10 AM, Jacob Carlborg <doob at me.com> wrote:

> On 2012-05-07 08:03, Jonathan M Davis wrote:
>
>  The only place that I'm aware of where this policy has caused some
>> problems is
>> arithmetic and integral promotions. There a few cases where it would be
>> nice
>> to change the semantics for that, but for the most part, the C/C++
>> semantics
>> are fine, and I'm sure that Walter considers whatever loss we get there
>> to be
>> worth the gain in making it so that C/C++ code ports to D without breaking
>> silently.
>>
>
> I had some problems with floats being default initialized to NaN.
>
>
That's still correct behavior for C, actually. Using an uninitialized
variable in C results in undefined behavior, so D still complies with C
requirements when it initializes floats to NaN.
I'm guessing there's more to it than that, though, because code that uses
uninitialized floats was probably wrong to begin with.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120507/bf667332/attachment.html>


More information about the Digitalmars-d mailing list