63 questions for “Enums”

Found in 1 field. Select a question to see its full answer.

Information Technology

63 questions in 5 technologies

#QuestionTechnologyTopicLevel
1What is 'reverse mapping' in numeric enums, and why don't string enums support it? TypeScript › EnumsTypeScriptEnumsIntermediate
2How does the EnumSet and EnumMap provide more efficient alternatives to HashSet<Enum> and HashMap<Enum, V> specifically for enum keys? Java › EnumsJavaEnumsIntermediate
3How does TypeScript's structural type checking treat two DIFFERENT numeric enums that happen to have the same underlying values? TypeScript › EnumsTypeScriptEnumsAdvanced
4How does Java implement enums under the hood at the bytecode level (extending java.lang.Enum), and what makes them inherently thread-safe and serialization-safe as singletons? Java › EnumsJavaEnumsAdvanced
5What are enums introduced in PHP 8.1, and how do backed enums differ from pure enums in terms of the values they can represent? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Intermediate
6How do you safely validate that an enum value received from external input (like deserialized JSON or a database) is actually a DEFINED member, given that enums don't enforce this by default? C# › Enums & FlagsC#Enums & FlagsAdvanced
7How do enums interact with generic constraints, and why has it historically been awkward to write generic, reusable flag-manipulation code? C# › Enums & FlagsC#Enums & FlagsAdvanced
8How can PHP 8's readonly properties, enums, and first class callable syntax be combined together to build more robust, immutable, and expressive domain models compared to earlier PHP versions? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)PHPPHP 8 Features (Attributes, Enums, Match, Nullsafe Operator)Advanced
9How do enums, introduced in PHP 8.1, provide a more type safe alternative to using class constants for representing a fixed set of related values? PHP › Constants & SuperglobalsPHPConstants & SuperglobalsAdvanced
10What are PHP 8's enums, and how do they provide a more type safe alternative to using plain class constants for representing a fixed set of related values? PHP › Type Declarations & Strict TypesPHPType Declarations & Strict TypesAdvanced