Kotlin for Java Programmers with Venkat Subramaniam

preview_player
Показать описание
Kotlin is that dark horse of JVM languages. It has gained prominence in the recent times for various good reasons. But, what does Kotlin really mean to Java programmers? In this presentation we will explore the language, learn about its key strengths and capabilities, take a peek under the hood to what it’s capabilities mean on the Java eco system, and how and where we can benefit from it.
Рекомендации по теме
Комментарии
Автор

49:20 He started the function with val and not fun? Is that the error?

nicoqueijo
Автор

What's Kotlin:
1. Statically typed 0:00
2. Compiles to 1:20
a. Java
b. JavaScript
3. Fluent, elegant, brings wonderful features enjoyed in other languages

Let's get it running: 1:50
1. Compile and run

Or

2. REPL 4:30
3. Run as script (like shell script or bash script) 5:10

Some nice things 6:30
1. Semicolon is optional
2. Sensible warnings 7:00 generated by compiler
3. Type inference 7:55
4. val vs var 10:00
5. string templates 11:55
6. Multiline strings 13:05
a. trmiMargin() or trimMargin("|")
7. Expressions over statements 15:20

Functions: 17:22
1. Lets' have some fun
a. Return type inference 17:58
b. Specifying return type 18:50
c. Void function 19:40
2. Default arguments 20:41
a. Can use previous parameters 22:00
3. Named arguments 22:30
4. Mixing positional and named arguments 22:45
5. Vararg and spread 25:33

For and Range
1. For x in 1..10 26:10
a. Until
b. Step
c. downTo
d. downTo and step 27: 00
2. Over a listOf 27:20
3. Indices 28:00

When:
1. Value 29:20
2. Else 30:20
3. Multiple values 30:50
4. In 13:10
5. Type is 31:30
a. Auto casting 31:50

Null type:
1. Return 34:00
2. Parameter 35:40
3. ?. And ?: 37:40 is if condition
4. Auto casting

Functional style: 38:20
1. Creating a lambda expression
2. Filter, map, reduce

Extension methods: 38:40
1. Classes are open
2. Not really part of the class

OO: 40:10
1. Classes
a. Final by default
2. Properties
3. Backing fields
4. Private set ()
5. Static methods
6. Companion objects 43:00
7. Data classes 45:00
a. Properties
b. componentN()
8. Inheritance 45:10

Delegation:
1. Lazy 48:20
2. To delegate

Fluency: 50:00
1. Infix
2. DSL

mehmoodrehman
join shbcf.ru