Comparing Compiler Errors in Go, Rust, Scala, Java, Kotlin, Python, Typescript, and Elm

There is an interesting article comparing how helpful compiler messages are in different languages. I guess, there is something to improve in Kotlin …

Can you suggest some concrete improvement?
That article is comparing very different languages with very different feartures.

The article have done concrete examples. The difference between Elm and Rust is that the developers of those languages made a conscious decision that they felt good error messages were an important part of the developer experience and so they should put a lot of effort into it. The first thing that would need to happen with Kotlin is for the core team to decide that error messages are very important, after that can come plenty of concrete ideas.

Quite frankly, this is very subjective.

First, longer messages are not necessarily better. I find the Java and Kotlin errors clear enough, and I would rather have something concise to work with instead of a long winding message just to tell me that a method has not been defined.

Second, if you are using an IDE, those two examples are non-issues. The IDE should tell you right away that you are doing something wrong. This article may be applicable to someone using a simple text editor, not an IDE; if that’s the case, you are already sacrificing your productivity…

1 Like