Mixing Constant and Literal Strings
Joshua Emmons shows us how to avoid implementing a stringly-typed interface. Using an enum with an associated type, we can enforce the use of constants, while also allowing for unexpected and unknowable string values.
Posted on June 2, 2017 |
← Previous Post
Next Post →