See also the discussion for Klabnik's Arguing about arguments

you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 1 month 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 😉).

  • source