Wednesday, March 22, 2023
Learning Code
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#
No Result
View All Result
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#
No Result
View All Result
Learning Code
No Result
View All Result
Home Java

Meta met a programming language it likes better than Java • The Register

learningcode_x1mckf by learningcode_x1mckf
October 26, 2022
in Java
0
Meta met a programming language it likes better than Java • The Register
74
SHARES
1.2k
VIEWS
Share on FacebookShare on Twitter


You might also like

Oracle aims to sustain Java's 27-year franchise with version 20 rollout – SiliconANGLE News

Oracle releases Java 20 – iTWire

Oracle Aims To Sustain Java's 27-Year Franchise With v20 Rollout – Slashdot

Meta, father or mother of Fb, is within the midst of migrating its Android app Java code to Kotlin, a youthful programming language that additionally depends on the Java Digital Machine, or JVM.

Created by software program device maker JetBrains, Kotlin debuted in 2011 and by 2016 had reached its 1.0 release. The next 12 months, it was adopted by Google as a first-class (supported) language for Android improvement and was put underneath the administration of its personal basis, funded by JetBrains and Google.

Till that time, most Android apps had been written in Java. In Might 2019, at its developer convention, Google started to encourage Android builders to favor Kotlin over Java. By the top of the 12 months, the search big said 60 % of the highest 1,000 Android apps contained Kotlin code.

Google’s rationale for utilizing Kotlin is that it is extra concise, safer, helps structured concurrency for simpler asynchronous code, and is interoperable with Java. It might even have had one thing to do with Java steward Oracle, which spent greater than a decade pursuing (and ultimately losing) an infringement declare in opposition to Google over using Java APIs in Android.

Meta seems to be equally intrigued by Kotlin and, as Fb software program engineer Omer Strulovich explains, the social advert biz turned VR high roller has been changing the Java code in a number of of its in style Android apps – Fb, Instagram, Messenger, Portal, and the Quest – with Kotlin.

Fittingly for an organization based as a social community, Meta needs to hold with the favored crowd.

“Kotlin is usually considered a greater language than Java, with greater favorability rankings than Java within the yearly Stack Overflow developer survey,” stated Strulovich, noting that Kotlin has change into a preferred language for Android improvement “[s]o it solely is sensible that we might shift our Android improvement at Meta to Kotlin…”

However past its reputation within the Android ecosystem – which Strulovich concedes within the broader market falls in need of Java, someplace within the prime three programming languages relying on who you ask – Kotlin has some sensible benefits.

These embody: nullability, to assist keep away from null reference errors by supporting varieties that may’t have a null worth; assist for purposeful programming by way of inline capabilities and lambda expressions; extra concise code; and assist for Domain Specific Languages (DSLs), restricted scope programming languages for specific duties.

The transition has had drawbacks, too. Blended codebases could be troublesome to keep up and Kotlin, having been round for much less time than Java, has a much less mature set of instruments. Redex, Fb’s Android bytecode optimizer, wanted to be up to date. So too did Pygments, a syntax highlighter. Additionally, some inside libraries for optimizing bytecode throughout compilation did not work with Kotlin and needed to be up to date. And new instruments like Ktfmt, a deterministic Kotlin formatter, needed to be constructed.

Our Android apps for Fb, Messenger, and Instagram every have greater than 1 million traces of Kotlin code, and the speed of conversion is growing

Meta might have determined to jot down solely new code in Kotlin however as an alternative it opted to transform all its Android apps.

“At present, our Android apps for Fb, Messenger, and Instagram every have greater than 1 million traces of Kotlin code, and the speed of conversion is growing,” stated Strulovich. “In whole, our Android codebase has greater than 10 million traces of Kotlin code.”

Strulovich didn’t say when Meta started this transition – firm builders discussed massive scale Kotlin utilization at a convention final 12 months – or what proportion of its Android app code has been transformed. The Register requested Meta for additional particulars.

Ten million traces of Kotlin into this transition, Meta has realized some advantages. For instance, although Kotlin code is shorter, it is maybe not as a lot as hoped.

“On common, we’ve seen a discount of 11 % within the variety of traces of code from this migration,” stated Strulovich. “We’ve seen a lot greater numbers quoted on-line, however we suspect these numbers are derived from particular examples.”

A part of the underwhelming code discount is that numerous the app code being translated consists of consumer interface definitions, which stay the identical whether or not they’re in Java or Kotlin.

Strulovich additionally stated that there have been no pace regressions, so no less than the transformed apps maintained their efficiency. The construct dimension of the Kotlin-infused apps additionally did not show to be an issue, although construct occasions did undergo – that was anticipated since Kotlin compilation hasn’t acquired as a lot consideration as Java compilation.

Meta’s migration is ongoing and accelerating, stated Strulovich. In the meantime, Java’s reputation, by no less than one measure, has declined 4.7 % within the final 5 years.

“Kotlin nonetheless lacks a number of the instruments and optimizations that we have now grown used to from working with Java,” stated Strulovich. “However we’re working to shut these gaps. As we make progress and these instruments and libraries mature, we will even work to launch them again to the group.” ®



Source link

Share30Tweet19
learningcode_x1mckf

learningcode_x1mckf

Recommended For You

Oracle aims to sustain Java's 27-year franchise with version 20 rollout – SiliconANGLE News

by learningcode_x1mckf
March 22, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

Oracle aims to sustain Java's 27-year franchise with version 20 rollout  SiliconANGLE Information Source link

Read more

Oracle releases Java 20 – iTWire

by learningcode_x1mckf
March 22, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

Oracle releases Java 20  iTWire Source link

Read more

Oracle Aims To Sustain Java's 27-Year Franchise With v20 Rollout – Slashdot

by learningcode_x1mckf
March 22, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

Oracle Aims To Sustain Java's 27-Year Franchise With v20 Rollout  Slashdot Source link

Read more

OpenJDK Java 20 Released With Latest Vector API, Scoped Values – Phoronix

by learningcode_x1mckf
March 21, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

OpenJDK Java 20 Released With Latest Vector API, Scoped Values  Phoronix Source link

Read more

Accelerating The Digital Transformation in West Java, Digiasia Bios … – PR Newswire

by learningcode_x1mckf
March 21, 2023
0
Google expands open source bounties, will soon support Javascript fuzzing too – ZDNet

Accelerating The Digital Transformation in West Java, Digiasia Bios ...  PR Newswire Source link

Read more
Next Post
East Java wins two Energy Council awards for energy transition

East Java wins two Energy Council awards for energy transition

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related News

OctaFX provided emergency aid for earthquake victims in West Java, Indonesia, Business News

OctaFX provided emergency aid for earthquake victims in West Java, Indonesia, Business News

December 20, 2022
Hack Club’s Sprig Is a Raspberry Pi Pico-Powered JavaScript Games Console — Free for Teen Coders

Hack Club’s Sprig Is a Raspberry Pi Pico-Powered JavaScript Games Console — Free for Teen Coders

November 8, 2022
Time limit for notify – JavaScript – SitePoint Forums

Is it possible to convert this piece of jquery code to javascript? – JavaScript – SitePoint Forums

October 27, 2022

Browse by Category

  • C#
  • C++
  • Java
  • JavaScript
  • Python
  • Swift

RECENT POSTS

  • Introducing Carbon, Google's Experimental Successor for C++ – MUO – MakeUseOf
  • Oracle aims to sustain Java's 27-year franchise with version 20 rollout – SiliconANGLE News
  • How to learn JavaScript? – JavaScript – SitePoint

CATEGORIES

  • C#
  • C++
  • Java
  • JavaScript
  • Python
  • Swift

© 2022 Copyright Learning Code

No Result
View All Result
  • Home
  • JavaScript
  • Java
  • Python
  • Swift
  • C++
  • C#

© 2022 Copyright Learning Code

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?