No we should not support enum types derived from strings
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri May 7 15:39:40 UTC 2021
On 5/7/21 11:33 AM, Adam D. Ruppe wrote:
> On Friday, 7 May 2021 at 15:25:30 UTC, Andrei Alexandrescu wrote:
>> Enums derived from strings should not be supported as strings in the
>> standard library.
>
> I don't think the stdlib should special case much of anything.
>
> Special casing enums is a mistake. If the user wants it treated as a
> string, they can cast it to a string.
yes
> Special casing static arrays is a mistake. The user can just slice it
> out the outside.
Yes
> Special casing alias this is a mistake. The user can pass what they
> meant to pass.
YES
> The phobos templates should work like all other templates - on the exact
> type passed. Other functions work with the normal overloading and
> implicit conversion rules.
>
> Kill all the special cases!
YES!!!
More information about the Digitalmars-d
mailing list