A Comparative Analysis of C# and Kotlin
Glenn Engstrand
Facilitates better, faster, cheaper product delivery from requirements to production deployment
When it comes to developing high-performance backend microservices, choosing the right programming language and ecosystem can make all the difference. In this article, I will compare two popular options: C# and Kotlin. Both languages have their strengths and weaknesses, which I will explore in detail.
C#, invented by Microsoft, is the most popular choice for developers who prefer coding for the .NET CLR. Modern C# is open source and does not require that you use other proprietary Microsoft products such as Microsoft Windows, Internet Information Server, or Microsoft SQL Server.
Kotlin, invented by JetBrains, is a popular choice for developers who prefer coding with Java alternatives for the JVM. Kotlin is open source and does not require that you use other proprietary JetBrains products such as IntelliJ.
In order to conduct this comparison, I developed two feature identical microservices; one in C# and the other in Kotlin. I used Visual Studio Code to write the code for both. This is an open source code editor provided by Microsoft. Both Microsoft and JetBrains release well designed, fully functional, free to use source code editors which is amazing since they both make money by selling proprietary source code editors too.
I also put both the C# and the Kotlin versions of the microservice under simulated load and measured the performance results. You might be surprised by how they compared when it comes to throughput and latency.