This is a very, very smart solution that Erica Sadun came up
Basically whenever you'd use a dictionary of attribute keys as a way to
configure an item, you'd instead use a
Set of enums with associated
values. That way, the type checker can confirm that your configuration
values are of the correct type.
For more details, and proper examples, check out her original blog post.