logoalt Hacker News

WalterBrightlast Tuesday at 8:07 PM0 repliesview on HN

D is consistent in that structs also default initialize:

    struct S { int a; float f; }
    S s;
For C, having an error when the initializer is omitted is better than nothing. However, that is not part of the C Standard, and you'll be relying on having a C compiler with that extension. Otherwise there is undefined behavior. To do it right means it needs to be standardized.