Allow use of Decimal type in enums #2080
Replies: 7 comments
-
This would require a runtime change in order for it to be a valid |
Beta Was this translation helpful? Give feedback.
-
If you genuinely need more than 64 different values for a flags enum, perhaps it would be ideal to try and break it up into 2 flags? |
Beta Was this translation helpful? Give feedback.
-
Probably will be better to have a proper (U)Int128 type with full language support (ability to declare constant literals, to declare them in enum's and so on...). |
Beta Was this translation helpful? Give feedback.
-
@fanol |
Beta Was this translation helpful? Give feedback.
-
Of course though, writes and reads would not be atomic |
Beta Was this translation helpful? Give feedback.
-
@YairHalberstadt we'll just have to build 128-bit processors then... |
Beta Was this translation helpful? Give feedback.
-
@yaakov-h |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Allow use of
Decimal / decimal
type in enums, as such:The primary motivation for this is that it would allow easy implementation of
FlagsAttribute
style enum to have 128 indepedently XOR-able flags, as opposed to the current 64 bit limit (Int64 / long
)Beta Was this translation helpful? Give feedback.
All reactions