How Kotlin makes your Java code better - Andy Balaam [ACCU 2019]

Опубликовано: 03 Октябрь 2024
на канале: ACCU Conference
995
20

#Kotlin #Java #ACCUConf

Concrete examples, based on real-world code, of how converting Java code to Kotlin improves it.

We will cover:

Reducing the amount of code for common patterns like value objects and default parameters

Preventing errors using immutability, null safety and explicit inheritance

Expressing ideas more directly using pattern matching, sealed classes and conditional expressions

Less verbose functional-style code like streams and lambdas

Clearer object structure with primary and secondary constructors

One of the joys of Kotlin is how easy it is to make a gradual transition from Java. All of the examples will demonstrate code that can be dropped in to an existing Java code base with little or no disruption.

If we have time, we’ll discuss things we wish were in Kotlin, and whether any of them are plausible on the JVM platform.

-------------------------

Andy Balaam loves code, and loves talking about code. His blog, articles and open source projects can be found at http://artificialworlds.net and his videos are at    / ajbalaam  

-------------------------
Future Conferences:
ACCU 2019 Autumn Conference, Belfast (UK):
2019-11-11 and 2019-11-12.
ACCU 2020 Spring Conference, Bristol (UK), Marriott City Centre:
2020-03-24 to 2020-03-28.
-------------------------
ACCU Website: www.accu.org
ACCU Conference Website: conference.accu.org
ACCU Twitter: @ACCUConf
ACCU YouTube:    / accuconf  

Filmed and Edited by Digital Medium Ltd - events.digital-medium.co.uk
Contact: [email protected]