Reasoning behind operators supported


#1

Does anyone know the reason why the bitwise and bit shifting operators (&, |, ^, <<, >>, >>>) are not included in Kotlin? I tried looking but couldn’t find anything specific.

I’m so use to them existing, I was surprised to find they aren’t available and that extensions (lsh, rhs, and, or) are used instead.

Are there any plans to include these, or other operators (e.g. power **, **=), post-1.0?


#3

Those are not extensions, they are members of numeric types :smile:
We are planning to add | and & later. Shift operations are a bit problematic syntactically (think Foo<Bar<Baz>>), and xor seems simply more descriptive as a word.