Steve Klabnik recently wrote about named arguments, optional arguments, default arguments, function overloading, and why most of that design space has historically made him nervous in Rust.
I agree with Steve.
In fact, I think I agree slightly more s…
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 😉).
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 😉).