In what situations does it make sense to use an enumeration when writing object-oriented code?
Enumerations1 are often associated with procedural code rather than object-oriented code. They tend to give rise to similar switch statements scattered through the code, and in general, these are replaced by polymorphism in object-oriented code.
In what situations does it make sense to use an enumeration when writing object-oriented code?
Enumerations1 are often associated with procedural code rather than object-oriented code. They tend to give rise to similar switch statements scattered through the code, and in general, these are replaced by polymorphism in object-oriented code.
In what situations does it make sense to use an enumeration when writing object-oriented code?
Enumerations1 are often associated with procedural code rather than object-oriented code. They tend to give rise to similar switch statements scattered through the code, and in general, these are replaced by polymorphism in object-oriented code.
Could someone explain HaXe enums?
I have AS3/PHP background and some basic understaning of enums from C++. Saying shortly: I read this:
Could someone explain HaXe enums?
I have AS3/PHP background and some basic understaning of enums from C++. Saying shortly: I read this:
Could someone explain HaXe enums?
I have AS3/PHP background and some basic understaning of enums from C++. Saying shortly: I read this:
Could someone explain HaXe enums?
I have AS3/PHP background and some basic understaning of enums from C++. Saying shortly: I read this:
Could someone explain HaXe enums?
I have AS3/PHP background and some basic understaning of enums from C++. Saying shortly: I read this:
What do you call an enum that translates its own values?
I see this pattern a lot, especially with countries, or more generally regions. An enum is defined with additional fields and with methods that translate to and from these values.
Example:
What do you call an enum that translates its own values?
I see this pattern a lot, especially with countries, or more generally regions. An enum is defined with additional fields and with methods that translate to and from these values.
Example: