• BB_C@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    28 days ago

    Remember that this has no runtime cost and is fully type-safe.

    For the sake of maximal accuracy, enum size overhead can become relevant sometimes. But a work-around exists (boxing the huge variant), and with or without boxing, the performance would still beat whatever other languages have to offer.

    Otherwise, good post (I would have to say that since it mostly rehashes points I made in previous comments 😉).