Enum literals, good? bad? what do you think?
Walter Bright
newshound2 at digitalmars.com
Wed Jul 21 23:00:06 UTC 2021
On 7/21/2021 3:22 PM, Adam D Ruppe wrote:
> On Wednesday, 21 July 2021 at 07:12:25 UTC, Mike Parker wrote:
>> ```d
>> enum expandEnum(EnumType, string fqnEnumType = EnumType.stringof) = (){
>
> Eeek, this is awful. It uses .stringof which means it is automatically stinky.
> It is liable for trouble when anything other than basic imports get involved.
Just use it right after the declaration of the enum.
> It doesn't
> get closer to the Swift examples.
How so?
More information about the Digitalmars-d
mailing list