Open gregsn opened 4 years ago
i propose 2 separate things: Flag
and Enum
.
And then let the user decide if bitwise ops are wanted and choose accordingly. the system would then allow the bitwise operators only for Flags.
That clear distinction would be quite consistent and the end-user story is also super simple:
Enum
which is a list of named entries where you can choose from.Flag
. This can be seen as an advanced Enum
that comes with extra Nodes |
, &
an ^
, but its entries can't exceed 64.When importing from c#, the same distinction can be made.
Flag
Enum
sounds good to me.
All imported enums already come with the bitwise operations
|
(bitwise or)&
(bitwise and)^
(bitwise xor).We should probably import those only on enums that come with the
[Flags]
attribute like seen here.Look: this is nonsense.
You still can import them manually, but by default, they don't get imported.
TBD: Is this a breaking change we can sell?