Libzypp/Design/Resolvable/Kinds
From openSUSE
Resolvable Kinds
Q Is Resolvable::ResKind case sensitive? I feel it would be better to have it insensitive (or internally store the value as enum), otherwise I'm afraid metadata file authors will make problems...
A There are 2 possible approaches for Resolvable::ResKind
1) As enumeration class (enum wrapped into a class, like class Rel)
2) The KindOf<type> template class.
With an enumeration we're limited to a fixed set of known kinds at runtime. Which is currently not a real problem, but it also restricts pools and solver to be used with these known kinds.
KindOf<type> is extensible, so you create your own kinds of resolvables, and use the provided solver with them. That's no requirement, but as long as it does not cost, I tend to try not to prevent us from offering this.
Another benefit of KindOf<type>, is that it's not limited to Resolvables. We already have KindOf<Capability>, and will have other Kinds too. As enumeration class we had to write one for each KindOf<type>.
And it can be refined to collaborate with some kind of Registry, so you could do some action, if new kindvalues appear (maybe usefull for URL protocol, so we can check whether some hander for this protocol was registered).
Back to your question: You're right. We should default to case a insensitive handling of kind strings. It eases our life and parsing. Case sensitivity can later be added as an option.
I'll change KindOf to store and provide the lowercased string. And adapt operator==/!= to do case insensitive comparison, if used with string.

