Most Viewed Content:

India’s censorship body gave power to remove pirated Movies from platforms

India’s Ministry of Information and Broadcasting announced that its...

Microsoft working on new features for Win11 / Win12: smart notifications, depth-of-field effects

According to the source Albacore (@thebookisclosed), Microsoft is preparing...

Toyota responds to continued production cuts in the next 3 months: easing pressure on dealer earnings

In response to the news that "production will continue...

Meta’s Android app switches to Kotlin programming language, it works better than Java

Facebook’s parent company, Meta, has revealed that it has migrated from Java to Kotlin, a younger programming language that also relies on the Java Virtual Machine (JVM), the language used to develop Android apps.

Created by software tools maker JetBrains, Kotlin debuted in 2011, with version 1.0 released in 2016. The following year, Kotlin was adopted by Google as the first class (supported) language for Android development and was placed under the management of its own foundation, funded by JetBrains and Google.

Prior to this, most Android apps were written in Java. in May 2019, at its developer conference, Google began encouraging Android developers to favor Kotlin over Java. at the end of that year, Google said that 60 percent of the top 1,000 Android apps contained Kotlin code.

Google’s reasons for recommending Kotlin were that it was cleaner, more secure, supported structured concurrency, made asynchronous code easier, and could interoperate with Java. But this may also have something to do with Java manager Oracle, which spent more than a decade bringing infringement claims against Google over the Java API used in Android (and ultimately lost).

Meta also seems to be interested in Kotlin, with Facebook software engineer Omer Strulovich saying they’re already replacing Java code with Kotlin in several of their popular Android apps, including Facebook, Instagram, Messenger, Portal and Quest.

Kotlin is generally regarded as a better language than Java, and in the annual Stack Overflow developer survey, Kotlin is rated higher than Java,” Strulovich said, noting that Kotlin has become a popular language for Android development. He notes that Kotlin has become a popular language for Android development, “so it makes sense for us to move Meta’s Android development to Kotlin.”

But beyond its popularity in the Android ecosystem, Strulovich acknowledges that it is still far less popular in the broader market than Java, which is the second or third most popular language in the world.

Kotlin’s advantages over Java include built-in nullability handling, support for inline functions and lambda expressions, shorter code, and the ability to define DSL (Domain-specific language). The downside is that you have to deal with a mixed code base for a long time, it’s harder to maintain, and Kotlin has been around for a shorter time than Java and has a less mature set of tools.

Today, our Android apps for Facebook, Messenger and Instagram all have more than a million lines of Kotlin code, and the conversion rate is growing,” Strulovich said. In total, our Android codebase has more than 10 million lines of Kotlin code.”

Strulovich did not say when Meta began this shift, or what percentage of its Android app code is converted.

Strulovich added: “On average, we’ve seen an 11 percent reduction in the number of lines of code for this migration. And there’s no performance regression, so at least the converted apps have maintained their original performance.”

Strulovich said the Meta migration is underway and accelerating, but he also said, “Kotlin still lacks some of the tools and optimizations we’ve become accustomed to in our work with Java. But we’re working hard to close those gaps. As we make progress and these tools and libraries mature, we’ll work to put them back out to the community as well.”

Latest

2024 Beijing Auto Show: Aion Y Plus new colors unveiled

At the 2024 Beijing Auto Show, the Aion brand...

OPPO Find X7 White phone opens for pre-sale, starting at 3899 RMB

The OPPO Find X7 white phone is now available...

Official spy photos of Lynk & Co ZERO pure electric sedan released

The deputy general manager of Lynk & Co Auto...

OPPO Find X7 Ultra satellite communication edition adds 16GB+ 512GB, priced at 6799 RMB

The OPPO Find X7 Ultra satellite communication version will...

Newsletter

Don't miss

2024 Beijing Auto Show: Aion Y Plus new colors unveiled

At the 2024 Beijing Auto Show, the Aion brand...

OPPO Find X7 White phone opens for pre-sale, starting at 3899 RMB

The OPPO Find X7 white phone is now available...

Official spy photos of Lynk & Co ZERO pure electric sedan released

The deputy general manager of Lynk & Co Auto...

OPPO Find X7 Ultra satellite communication edition adds 16GB+ 512GB, priced at 6799 RMB

The OPPO Find X7 Ultra satellite communication version will...

Honda Plans Electric Vehicle Supply Chain Project in Canada: 240K Annual Capacity

Honda recently announced plans to build an electric vehicle...
James Lopez
James Lopezhttps://www.techgoing.com
James Lopez joined Techgoing as Senior News Editor in 2022. He's been a tech blogger since before the word was invented, and will never log off.

Audi and Porsche announce charging network cooperation in China

Audi China announced that Audi and Porsche announced a charging network cooperation in China and opened charging stations of their respective brands to its...

Google Android 15: Restricts sideloaded apps from obtaining sensitive permissions

Foreign technology media Android Authority recently excavated the latest Android 15 Beta 1.1 update and discovered the "Enhanced Confirmation Mode" in the code, which...

2024 Beijing Auto Show: Genesis G80 Magma EV Unveiled

At the 2024 Beijing Auto Show, the Genesis G80 EV Magma special edition was officially unveiled. The car is based on the current Genesis...