Enum literals, good? bad? what do you think?

Dukc ajieskola at gmail.com
Thu Jul 22 19:38:01 UTC 2021

On Thursday, 22 July 2021 at 14:58:12 UTC, Paul Backus wrote:
> Ok, now imagine you're new to D and don't know about this 
> feature. What are you going to *think* `E e = ".y"` does?

Oh, I just realized adding the dot solves nothing.

enum E : string { x = ".y", y = ".x" }

E e = ".y"; // *Facepalm*

More information about the Digitalmars-d mailing list