DIPX: Enum Literals / Implicit Selector Expression
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Fri Jul 1 09:02:12 UTC 2022
On Friday, 1 July 2022 at 04:53:01 UTC, Walter Bright wrote:
> On 6/30/2022 2:19 AM, bauss wrote:
>> I don't think D could ever settle on a single rule here that a
>> majority would agree upon.
>
> C++ threw in the towel and added scoped enums with a somewhat
> different syntax. Now C++ has two different kinds of enums.
>
> Having too many choices is not good language design.
C and D don't have an enumeration type. `enum class` gave C++ a
somewhat type safe enumeration type. It is very useful.
More information about the Digitalmars-d
mailing list