Hacker News new | ask | show | jobs
by flohofwoe 1597 days ago
Also, the C version should really look like this:

    const struct role r = {
        .name = "basic",
        .flag = 1,
        .disabled = false,
    };
(of course this doesn't give you uninitialized memory in case new items are added to the struct, but why would one ever want that?)