KEEP for overloadable bitwise operators

I was reminded of this today, and I would like to see more community feedback such that I could improve it.
Late July I opened KEEP 142 as a proposal to introduce overloadable bitwise operators to Kotlin. This proposal would keep the infix operators as they are (for the time being), while also introducing new operators in keeping with the syntax of the operators in other languages. If merged, this would provide a fix to KT-1440 while also making plenty of Kotlin spread amongst many projects easier to read

I replied to the KEEP. No point in starting a 3rd discussion about this when there are 2 out there already :wink:

Of course, I just wanted to get more attention to that KEEP, since it’s pretty much been dormant since late July/early August.

Sure and I don’t think it’s a bad idea to mention it here. There might be a few people here that don’t watch the KEEP. But you also have to consider that there is no guarantee that a KEEP will be implemented in the language and as far as I have seen most people on the Kotlin team are against bitwise operators (at least all comments about them are negative).

I’m well aware that the Kotlin team seems to have a distaste for bitwise operators, though I’m unsure as to why. I actually have this proposal fully implemented in what started with “hacking on kotlinc to learn”. This proposal was opened because I would be extremely happy to provide those contributions to upstream to allow such functionality.

In that case you should probably upload your prototype to github and add the link to it in the KEEP. A working prototype might help a lot.

The KEEP does note that a prototype is implemented, though i will add a link for it. In the mean time my fork with the additions is at GitHub - Redrield/kotlin at bitwise-operators

1 Like