While we're on the topic of complete enumeration support, I don't see anything in the docs about bitwise operations.
In C# for example there's the StringSplitOptions enumeration which has two values: RemoveEmptyEntries and TrimEntries. These are assigned to integers such that you can or bitwise "or" them to get both behaviors:
string text = " apple , banana , , orange ";
string[] result = text.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
Is there any way to do this in Objo, and if not, how might it be done? This is not a rare use case for enumerations.
Bitwise And / Or would not necessarily require new keywords or operators; they can probably just use And / Or in context.
If a = 1 Or b = 2 Then
# logical Or
End If
If a Or b = 16 Then
# bitwise Or
End If
Possibly easier to say than to implement, in which case, I certainly wouldn't object to alternative keywords (to be drop dead obvious, BitwiseOr or BitOr, BitwiseAnd or BitAnd. Or even OrBit and AndBit, lol)
All that said, another alternative would just be to add another, combined item to the enumeration (in the above example, say, IgnoreEmptyAndTrim) but that can get gnarly, and sometimes you might want to combine any 2 or more of a larger number of options. Still another possibility I guess is a parameter array of Enumeration Values in the method signature.