No we should not support enum types derived from strings
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri May 7 16:45:56 UTC 2021
On 5/7/21 12:30 PM, Adam D. Ruppe wrote:
> On Friday, 7 May 2021 at 15:51:39 UTC, Steven Schveighoffer wrote:
>> But an enum with base string type can be passed as a string.
>
> "Can be passed as a" is not the same as "is a". There's a conversion
> involved.
YES! Int is not floating point, but yes you can initiate a floating
point from an int.
BTW it's worse than I feared. There are 104 occurrences of StringTypeOf
in phobos. There should be 0.
More information about the Digitalmars-d
mailing list