Using std.conv.to with enum that is based on string type
Uranuz via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jul 19 12:39:25 PDT 2014
> Ok, now I see what you mean. The title of the thread is a
> little confusing because actually you are not talking only
> about string-based enums.
>
It's OK. It happened because I understood this problem myself in
this way only during the discussion. So as I think there are 2
options. First is keep it al *as is*. In this case I propose to
improve documentation about it that in case of conversion of
enums into string types and vice versa we actualy converting
*identifiers* but not underlying values. The second option is to
change it to conversions between underlying values. In this case
we need to evaluate how much code will be broken and take some
measures to warn developers about these changes.
I think more feedback is needed about this to rethink more
suitable solution.
P.S. I maybe explain it not so well. It's because of my bad
English.
More information about the Digitalmars-d
mailing list