A fellow engineer at work asked me today how to convert an enum to a string value. This is what I came up with:
shrink_to_fit that doesn’t suck
Lesson learned the hard way: trust the implementation to do the right thing! Everything else has been strikethrough’ed because my approach was flowed from the beginning. See the quoted comments at the bottom of this post.