New Language Shortcomings

During the last 20 years, a huge number of new programming languages have been developed. In general, new languages have evolved to address the perceived shortcomings of older languages. Unfortunately, these languages may not always live up to the hype. Furthermore, new language ‘features’ may actually end up creating more complicated and unreadable code. I have previously written about the importance of simple code as well as the trap of “time saving” frameworks. However, not all new languages follow these ideals.

Recently, I have started learning Kotlin. Kotlin is a JVM language which is increasingly used for Android development. Thanks to a variety of improvements, Kotlin code can do more work with less code. However, this isn’t always a good thing. For example, Kotlin generates a significant amount of code behind the scenes. While this does reduce the burden to developers, it does not guarantee that the desired code will actually perform the necessary function. In fact, I have often found that the most difficult bugs to find are those generated by code under the hood. For example, I remember using Hibernate in the 2000’s to connect Java to the database. In 99% of my use cases, Hibernate performed incredibly well and saved significant time. However, the 1% of cases where the SQL generated by Hibernate didn’t perform properly required enough research and work to remove any possible time savings to the developer.

Another example with Kotlin, and a large number of newer languages, is the lack of requirements to actually define variables and return types for functions. While this may save time, it means that future developers will be forced to read the code more closely to determine its meaning. Likewise, the growing use of lambda functions – while incredibly useful in a broad assortment of situations – is beginning to create code that is nothing but extended sequences of lambda functions with no obvious intent. In both instances, I prefer verbose code that can be easily understood by future developers with far less chance for misunderstandings.

While many of these newer languages have some amazing features, few have actually captured much market share. Maybe it’s because of the glut of languages on the market now, or maybe it’s because developers have found these ‘improved’ languages actually cause more problems than they solve. For me, I will continue to write code with the hope that junior developers will not be wowed by my wizardry, but rather that they will be able to understand my code without any ambiguity.

Leave a Reply