Hello everyone,
I love Kotlin and I use it extensively. I have many thousands of lines of it in everyday use and I am generally very happy with it.
Unfortunately I have to complain a bit now. I feel like the compiler is mothering me too much. I could be wrong and I am open to changing my mind but the way I see it, there are four issues compounding that make it so annoying for me.
Number one: There are lots and lots of warnings, many more than in Java. When I compile my project I get pages and pages of warnings even-though itâs a good project that works well. So the signal to noise here is not great
Number two: Compiler thinks it knows better when it doesnât. Take this code:
The warning for âdriverâ is there because it âcould be privateâ. No, Compiler, it could not be privat because this is a library and the code that uses that library sometimes wants to access driver.
The warning for âprotectedâ is also because it âcould be privateâ. This really infuriating because, DUDE, I told you this is an open class. I also told out that it should be âprotectedâ. Do you really think you know better than the programmer that literally typed out the visibility modifier?
In the same file I get âunusedâ warnings because, well, itâs still a library.
Number three: apparently Intellij removed the feature where I can add the appropriate @Suppress annotation with one click of the mouse
EDIT: This is my bad, the option is there and I just didnât know where, for whatever reason. This make the whole problem tractable and therefore not an issue for me anymore
Number four: itâs too hard to find the proper pattern for @Suppress given the large number of warnings. When I google it I find âtipsâ that I should look them up in some plugin source file. Please, guys, this is not okay.
Thanks for reading and I hope you take the feedback in the way it is intended which is that I love Kotlin but hate squiggly lines that I canât solveâŠ