The document discusses the Kotlin programming language. It highlights that Kotlin is a modern, pragmatic language that provides good tooling and interoperability with Java. It has grown significantly in popularity since its initial release. The document then discusses various features of Kotlin like its concise and readable syntax, null safety, support for lambdas and extensions, and how it can be used for multi-platform projects. Kotlin aims to be an improvement over Java by making code more concise, safe, and expressive while maintaining interoperability with existing Java code and libraries.
Kotlin is a new programming language for Android App development and it is discovered by Google.It will be an alternate option in place of Java language for android app development.
Introduction to Koltin for Android Part I Atif AbbAsi
Welcome to Android Basics in Kotlin! In this course, you'll learn the basics of building Android apps with the Kotlin programming language. Along the way, you'll develop a collection of apps to start your journey as an Android developer.
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017Hardik Trivedi
The presentation was given in Ahmedabad GDG DevFest 2017. It has introduction to Kotlin for Android App Development.
Talk will is specially designed for beginners, who has heard about Kotlin but couldn’t explore it till date. The talk will take attendees to the journey where they can know Kotlin as a programming language. What Kotlin offers for Android? How to start the development using Kotlin, Features of Kotlin, Some of the disadvantages of Kotlin.
I will be discussing about following topics
- What’s Kotlin
- Why Kotlin
- Setting up Kotlin
- Features of Kotlin
- Syntax crash course
- Classes
- Features of function programming like Lamdabs and Higher order functions
- Usage of Anko
- Migrating from Java project to Kotlin
- Future of Kotlin
- Disadvantages of Kotlin
YouTube Link: https://youtu.be/eVLPnewCMRI
**Edureka Online Courses: https://www.edureka.co **
This Edureka "Kotlin vs Java" PPT will help you point out the major differences between two Android Development languages - Kotlin and Java. Below are the topics covered in this Kotlin vs Java PPT:
What is Kotlin?
What is Java?
Parameters to compare
Drawbacks of Java
Advantages of Java over Kotlin
Is Kotlin going to replace Java?
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Google is adding Kotlin as an official programming language for Android development. Kotlin is a language that runs on the JVM and has full interoperability with Java. It costs nothing to adopt! I will show some cool features of Kotlin, how it makes developing with Android easy and finally we'll see what happens under the hood when we write in Kotlin.
Kotlin is a new programming language for Android App development and it is discovered by Google.It will be an alternate option in place of Java language for android app development.
Introduction to Koltin for Android Part I Atif AbbAsi
Welcome to Android Basics in Kotlin! In this course, you'll learn the basics of building Android apps with the Kotlin programming language. Along the way, you'll develop a collection of apps to start your journey as an Android developer.
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017Hardik Trivedi
The presentation was given in Ahmedabad GDG DevFest 2017. It has introduction to Kotlin for Android App Development.
Talk will is specially designed for beginners, who has heard about Kotlin but couldn’t explore it till date. The talk will take attendees to the journey where they can know Kotlin as a programming language. What Kotlin offers for Android? How to start the development using Kotlin, Features of Kotlin, Some of the disadvantages of Kotlin.
I will be discussing about following topics
- What’s Kotlin
- Why Kotlin
- Setting up Kotlin
- Features of Kotlin
- Syntax crash course
- Classes
- Features of function programming like Lamdabs and Higher order functions
- Usage of Anko
- Migrating from Java project to Kotlin
- Future of Kotlin
- Disadvantages of Kotlin
YouTube Link: https://youtu.be/eVLPnewCMRI
**Edureka Online Courses: https://www.edureka.co **
This Edureka "Kotlin vs Java" PPT will help you point out the major differences between two Android Development languages - Kotlin and Java. Below are the topics covered in this Kotlin vs Java PPT:
What is Kotlin?
What is Java?
Parameters to compare
Drawbacks of Java
Advantages of Java over Kotlin
Is Kotlin going to replace Java?
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
Google is adding Kotlin as an official programming language for Android development. Kotlin is a language that runs on the JVM and has full interoperability with Java. It costs nothing to adopt! I will show some cool features of Kotlin, how it makes developing with Android easy and finally we'll see what happens under the hood when we write in Kotlin.
If you still haven't heard of it, there is a new star in JVM sky - Kotlin. This short presentation will serve as intro for those who wan't to hear what's all the fuss about and dive deeper into this new alternative to Java
With the announcement on officially supporting Kotlin for Android, this presentation tries to compare Java and Kotlin to encourage people to switch to Kotlin
Introduction to Kotlin Language and its application to Android platformEastBanc Tachnologies
Author: Oleg Godovykh, eastbanctech.com
Kotlin is a new programming language built by Jetbrains and is a new member of JVM family. As opposed to typical reason to introduce some new language, Kotlin main goal isn't to create new paradigm or fill a new niche, but to make routine tasks much easier and safer. Kotlin gains popularity across Android developer community, and in this presentation it is shown how Kotlin usage can dramatically simplify typical mobile app development.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
I used these slides to present the benefits of using Kotlin to a group of people I work with. The presentation focuses on comparing Kotlin to Java, and in particular showing how Kotlin can help in writing safer, more concise and readable code. I used a few java gotchas/puzzles to demonstrate how Kotlin may prevent us from doing silly things.
A simple document emphasizing the reasons behind evolution of .Net technology and how it simplified the yester-decade's technology issues. This document is simplified and teaches a lame man as why & how .net framework gained importance and how it is ruling the roost.
Why I ❤️ Kotlin Multiplatform (and want YOU to also ❤️ Kotlin Multiplatform)Derek Lee Boire
Given at the February 2023 Tokyo iOS Meetup, my goal with this presentation is to persuade you, the iOS Engineer, to become interested in using Kotlin Multi-platform for your iOS development to expand your audience to include Android users.
Main topics:
- Why KMM?
- Trade Offs (Pros/Cons)
- Practical Use Cases
- Typical Dev Cycle, Ways of Sharing Code
- Important Multiplatform Skills
- Summary / Q&A / Feedback
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
JavaScript has some stunning features like Closures, Prototype etc. which can help to improve the readability and maintainability of the code. However, it is not easy for inexperienced developer to consume and apply those features in day to day coding. The purpose of the presentation ‘Advanced JavaScript’ is to help a reader easily understand the concept and implementation of some advanced JavaScript features.
Kotlin is a JVM language developed by Jetbrains. Its version 1.0 (production ready) was released at the beginning of the year and made some buzz within the android community. This session proposes to discover this language, which takes up some aspects of groovy or scala, and that is very close to swift in syntax and concepts. We will see how Kotlin boosts the productivity of Java & Android application development and how well it accompanies reactive development.
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016STX Next
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
If you still haven't heard of it, there is a new star in JVM sky - Kotlin. This short presentation will serve as intro for those who wan't to hear what's all the fuss about and dive deeper into this new alternative to Java
With the announcement on officially supporting Kotlin for Android, this presentation tries to compare Java and Kotlin to encourage people to switch to Kotlin
Introduction to Kotlin Language and its application to Android platformEastBanc Tachnologies
Author: Oleg Godovykh, eastbanctech.com
Kotlin is a new programming language built by Jetbrains and is a new member of JVM family. As opposed to typical reason to introduce some new language, Kotlin main goal isn't to create new paradigm or fill a new niche, but to make routine tasks much easier and safer. Kotlin gains popularity across Android developer community, and in this presentation it is shown how Kotlin usage can dramatically simplify typical mobile app development.
Presented on 27th September 2017 to a joint meeting of 'Cork Functional Programmers' and the 'Cork Java Users Group'
Based on the Kotlin Language programming course from Instil. For more details see https://instil.co/courses/kotlin-development/
I used these slides to present the benefits of using Kotlin to a group of people I work with. The presentation focuses on comparing Kotlin to Java, and in particular showing how Kotlin can help in writing safer, more concise and readable code. I used a few java gotchas/puzzles to demonstrate how Kotlin may prevent us from doing silly things.
A simple document emphasizing the reasons behind evolution of .Net technology and how it simplified the yester-decade's technology issues. This document is simplified and teaches a lame man as why & how .net framework gained importance and how it is ruling the roost.
Why I ❤️ Kotlin Multiplatform (and want YOU to also ❤️ Kotlin Multiplatform)Derek Lee Boire
Given at the February 2023 Tokyo iOS Meetup, my goal with this presentation is to persuade you, the iOS Engineer, to become interested in using Kotlin Multi-platform for your iOS development to expand your audience to include Android users.
Main topics:
- Why KMM?
- Trade Offs (Pros/Cons)
- Practical Use Cases
- Typical Dev Cycle, Ways of Sharing Code
- Important Multiplatform Skills
- Summary / Q&A / Feedback
What is the DOM?
The DOM is a W3C (World Wide Web Consortium) standard.
The DOM defines a standard for accessing documents:
"The W3C Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."
The W3C DOM standard is separated into 3 different parts:
Core DOM - standard model for all document types
XML DOM - standard model for XML documents
HTML DOM - standard model for HTML documents
The HTML DOM (Document Object Model)
When a web page is loaded, the browser creates a Document Object Model of the page.
The HTML DOM model is constructed as a tree of Objects.
With the HTML DOM, JavaScript can access and change all the elements of an HTML document.
JavaScript has some stunning features like Closures, Prototype etc. which can help to improve the readability and maintainability of the code. However, it is not easy for inexperienced developer to consume and apply those features in day to day coding. The purpose of the presentation ‘Advanced JavaScript’ is to help a reader easily understand the concept and implementation of some advanced JavaScript features.
Kotlin is a JVM language developed by Jetbrains. Its version 1.0 (production ready) was released at the beginning of the year and made some buzz within the android community. This session proposes to discover this language, which takes up some aspects of groovy or scala, and that is very close to swift in syntax and concepts. We will see how Kotlin boosts the productivity of Java & Android application development and how well it accompanies reactive development.
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016STX Next
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
StxNext Lightning Talks - Feb 12, 2016
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice when it comes to Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and on the other - keeping short compile times.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up an Android-kotlin project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin usage is presented and the language is compared to SCALA and SWIFT.
Poniendo Kotlin en producción a palos (Kotlin in production, the hard way)Andrés Viedma Peláez
Talk presented at Codemotion Madrid 2017. Kotlin in a live production environment from early 2017, in microservices using a Java platform in Tuenti, Discussions on risks and experiences months after.
This is an introductory SCALA workshop for a JAVA developer. Hence, we're going to explore 'functional' side of the language. SCALA is 50% OOP (Object-Oriented-Programming) and 50% FP (Functional-Programming). Main principles of FP are discussed, such as: tail-recursion, currying, pure-functions, lazy evaluation etc.) along with some examples in code.
We look at the basic keywords and constructs in SCALA.
In the end SCALA tools which are helpful for developers are listed.
This is an quick introduction to Scalding and Monoids. Scalding is a Scala library that makes writing MapReduce jobs very easy. Monoids on the other hand promise parallelism and quality and they make some more challenging algorithms look very easy.
The talk was held at the Helsinki Data Science meetup on January 9th 2014.
Android Developer Group Poznań - Kotlin for Android developers
STXInsider example project in Kotlin:
https://github.com/kosiara/stx-insider
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, has clear benefits for developers on one hand and keeps short compile times on the other.
As a mobile team we got interested in Kotlin a few months before its final release which gave us time to test it thoroughly before production use. The language has some clear advantages for an Android programmer - it enables migration from Java projects that have been under development for some time already. Java&Kotlin coexistence simplifies Kotlin introduction as only new functionality is written in JetBrain’s new language leaving all the legacy code untouched.
Transitioning gives the developer an opportunity to use lambdas, new syntax for data objects, extension functions to easily expand Android SDK’s classes functionality and infix notation to write DSL-like structures. Almost all the libraries you use today will work with Kotlin thanks to 100% Java compatibility. The same is true for Android SDK classes - all of them will seamlessly work with the new programming language. Kotlin gives you more choice when it comes to reflection, creating documentation and being null-pointer safe. Android works great with it out of the box so you won’t need to change your development habits.
Our production project in Kotlin turned out to be a success after 4 months of development. We had 0 bugs related to Kotlin as a programming language. Our code footprint is almost 30% smaller thanks to JetBrain’s, we benefit from nullpointer safety, closures, translated enums, data objects and use infix notation for logging and displaying Snackbars.
===========
In this presentation you'll find basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
We look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
비행기 설계를 왜 통일 해야 할까?
디자인 시스템을 하는 이유
비행기들이 다 용도가 다르다...어떻게 설계하지?
맥락이 다른 페이지와 패턴
경유지까지 아직 멀었다... 언제 수리하지?
디자인 시스템을 적용하는 시점
엔지니어랑 얘기해서 정비해야하는데...어떻게 수리하지?
디자인 시스템을 적용하는 프로세스
비행기 설계가 바뀐걸 어떻게 알리지?
디자인 시스템의 전파
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
15. public class Person {
private final String name;
private final int age;
public Person(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
}
33. Nullable Types Under the Hood
No performance overhead
@Nullable, @NotNull annotations
34. class Optional<T>(val value: T) {
fun isPresent() = value != null
fun get() = value ?:
throw NoSuchElementException("No value present")
}
Nullable types ≠ Optional
35. Using annotated Java types from Kotlin
Type
behaves like
regular Java type
@ParametersAreNonnullByDefault
@Nullable
@NotNull Type
Type?
Type
Type
@MyNonnullApi
Type/
Type?
41. fun String.lastChar() = get(length - 1)
this can be omitted
Extension Functions
fun String.lastChar() = this.get(this.length - 1)
42. fun String.lastChar() = get(length - 1)
Calling Extension Functions
from Java code
StringExtensions.kt
char c = StringExtensionsKt.lastChar("abc");
JavaClass.java
import static StringExtensionsKt.lastChar;
char c = lastChar("abc");
43. No. Because it’s a regular
static method under the hood.
fun String.lastChar() = get(length - 1)
Extension Functions
Is it possible to call a private
member of String here?
46. { employee: Employee -> employee.city == City.PRAGUE }
What’s an average
age of employees
working in Prague?
Working with collections with Lambdas
val employees: List<Employee>
employees.filter { it.city == City.PRAGUE }.map { it.age }.average()
data class Employee(
val city: City, val age: Int
)
47. What’s an average
age of employees
working in Prague?
Working with collections with Lambdas
val employees: List<Employee>
data class Employee(
val city: City, val age: Int
)
extension functions
employees.filter { it.city == City.PRAGUE }.map { it.age }.average()
50. val sb = StringBuilder()
with (sb) {
appendln("Alphabet: ")
for (c in 'a'..'z') {
append(c)
}
toString()
}
The with function
with is a function
val sb = StringBuilder()
sb.appendln("Alphabet: ")
for (c in 'a'..'z') {
sb.append(c)
}
sb.toString()
51. val sb = StringBuilder()
with (sb) {
this.appendln("Alphabet: ")
for (c in 'a'..'z') {
this.append(c)
}
this.toString()
}
val sb = StringBuilder()
with (sb, { ->
this.appendln("Alphabet: ")
for (c in 'a'..'z') {
this.append(c)
}
this.toString()
})
lambda
is its
second
argument
Lambda with receiverwith is a function
this is
an implicit receiver
in the lambda
val sb = StringBuilder()
with (sb) {
appendln("Alphabet: ")
for (c in 'a'..'z') {
append(c)
}
toString()
}
this can be omitted
52. Lambda with receiver
val sb = StringBuilder()
with (sb) {
appendln("Alphabet: ")
for (c in 'a'..'z') {
this.append(c)
}
}
lambda with
implicit this
54. with (window) {
width = 300
height = 200
isVisible = true
}
The with function
class Window(
var width: Int,
var height: Int,
var isVisible: Boolean
)
55. window.width = 300
window.height = 200
window.isVisible = true
with (window) {
width = 300
height = 200
isVisible = true
}
Inline functions
is declared as
inline function
generated bytecode is similar to:
No performance overhead for creating a lambda!
56. The apply function
val mainWindow =
windowById["main"]?.apply {
width = 300
height = 200
isVisible = true
} ?: return
Applies the given actions
and returns receiver as a result:
63. Sharing common code
• Sharing business logic
• Keeping UI platform-dependent
• The shared part might vary
64. Common code
• you define expect declarations in the common
code and use them
• you provide different actual implementations
for different platforms
65. Time measurement example
expect fun measureTime(action: () -> Unit): Duration
Expected platform-specific API:
Expected API can be used in the common code:
measureTime {
// operation
}
66. Platform-specific Implementations
expect fun measureTime(action: () -> Unit): Duration
actual fun measureTime(action: () -> Unit): Duration {
// implementation using System.nanoTime()
}
actual fun measureTime(action: () -> Unit): Duration {
// implementation using window.performance.now()
}
actual fun measureTime(action: () -> Unit): Duration {
// implementation using std::chrono::high_resolution_clock
}
Kotlin/JVM
Kotlin/JS
Kotlin/Native
67. Common code
• can use the standard library
• can define expect declarations and use them
• can use other multi-platform libraries
69. Many apps already in production
Going Native: How I used Kotlin Native to Port 6 years
of Android Game Code to iOS in 6 months
Shipping a Mobile Multiplatform Project on iOS &
Android
Your Multiplatform Kaptain has Arrived: iOS release is
powered by Kotlin Multiplatform