Kotlin in Action, Second Edition, Video Edition

Kotlin in Action, Second Edition, Video Edition

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 15h 59m | 2.45 GB

Expert guidance and amazing examples from Kotlin core developers! It’s everything you need to get up and running fast.

Kotlin in Action, Second Edition takes you from language basics to building production-quality applications that take advantage of Kotlin’s unique features. Discover how the language handles everything from statements and functions to classes and types, and the unique features that make Kotlin programming so seamless.

In Kotlin in Action, Second Edition you will learn:

  • Kotlin statements and functions, and classes and types
  • Functional programming on the JVM
  • The Kotlin standard library and out-of-the-box features
  • Writing clean and idiomatic code
  • Combining Kotlin and Java
  • Improve code reliability with null safety
  • Domain-specific languages
  • Kotlin coroutines and flows
  • Mastering the kotlinx.coroutines library

Kotlin in Action, Second Edition is a complete guide to the Kotlin language written especially for readers familiar with Java or another OO language. Its authors—all core Kotlin language developers and Kotlin team members—share their unique insights, along with practical techniques and hands-on examples. This new second edition is fully updated to include the latest innovations, and it adds new chapters dedicated to coroutines, flows, and concurrency.

Kotlin is a low-hassle, high-productivity programming language flexible enough to handle any web, mobile, cloud, and enterprise application. Java developers will appreciate the simple syntax, intuitive type system, excellent tooling, and support for functional-style programming. Plus, since Kotlin runs on the JVM, it integrates seamlessly with existing Java code, libraries, and frameworks, including Spring and Android.

Kotlin in Action, Second Edition teaches you Kotlin techniques you can use for almost any type of application, from enterprise services to Android apps. The authors are all members of the Kotlin team, so you can trust that even the gnarly details are dead accurate. You’ll start with Kotlin fundamentals, learning how the language handles everything from statements and functions to classes and types, and about its unique features that make Kotlin programming so seamless.

As you progress through this masterful book, you’ll get hands-on with the Kotlin standard library, functional programming in Kotlin, and advanced features such as generics and reflection. And this updated second edition now covers coroutines and structured concurrency to help you create efficient high-performance applications.

What’s inside

  • Guidance from members of the Kotlin team
  • Domain-specific languages
  • Kotlin coroutines and flows
Table of Contents

1 Introducing Kotlin
2 Kotlin What and why
3 Kotlin s primary traits
4 Areas in which Kotlin is often used
5 The philosophy of Kotlin
6 Using the Kotlin tools
7 Summary
8 Kotlin basics
9 Encapsulating behavior and data Classes and properties
10 Representing and handling choices Enums and when
11 Iterating over things while and for loops
12 Throwing and catching exceptions in Kotlin
13 Summary
14 Defining and calling functions
15 Making functions easier to call
16 Adding methods to other people s classes Extension functions and properties
17 Working with collections varargs, infix calls, and library support
18 Working with strings and regular expressions
19 Making your code tidy Local functions and extensions
20 Summary
21 Classes, objects, and interfaces
22 Declaring a class with nontrivial constructors or properties
23 Compiler-generated methods Data classes and class delegation
24 The object keyword Declaring a class and creating an instance, combined
25 Extra type safety without overhead Inline classes
26 Summary
27 Programming with lambdas
28 Using Java functional interfaces Single abstract methods
29 Defining SAM interfaces in Kotlin fun interfaces
30 Lambdas with receivers with, apply, and also
31 Summary
32 Working with collections and sequences
33 Lazy collection operations Sequences
34 Summary
35 Working with nullable values
36 Making possibly null variables explicit with nullable types
37 Taking a closer look at the meaning of types
38 Combining null checks and method calls with the safe call operator
39 Providing default values in null cases with the Elvis operator
40 Safely casting values without throwing exceptions as
41 Making promises to the compiler with the non-null assertion operator !!
42 Dealing with nullable expressions The let function
43 Non-null types without immediate initialization Late-initialized properties
44 Extending types without the safe-call operator Extensions for nullable types
45 Nullability of type parameters
46 Nullability and Java
47 Summary
48 Basic types, collections, and arrays
49 Collections and arrays
50 Summary
51 Embracing Kotlin
52 Operator overloading and other conventions
53 Overloading comparison operators makes it easy to check relationships between objects
54 Conventions used for collections and ranges
55 Making destructuring declarations possible with component functions
56 Reusing property accessor logic Delegated properties
57 Summary
58 Higher-order functionsLambdas as parameters and return values
59 Removing the overhead of lambdas with inline functions
60 Returning from lambdas Control flow in higher-order functions
61 Summary
62 Generics
63 Generics at run time Erased and reified type parameters
64 Variance describes the subtyping relationship between generic arguments
65 Summary
66 Annotations and reflection
67 Reflection Introspecting Kotlin objects at run time
68 Summary
69 DSL construction
70 Building structured APIs Lambdas with receivers in DSLs
71 More flexible block nesting with the invoke convention
72 Kotlin DSLs in practice
73 Summary
74 Concurrent programming with coroutines and flows
75 Coroutines
76 Concurrency the Kotlin way Suspending functions and coroutines
77 Comparing threads and coroutines
78 Functions that can pause Suspending functions
79 Comparing coroutines to other approaches
80 Entering the world of coroutines Coroutine builders
81 Deciding where your code should run Dispatchers
82 Coroutines carry additional information in their coroutine context
83 Summary
84 Structured concurrency
85 Cancellation
86 Summary
87 Flows
88 Cold flows
89 Hot flows
90 Summary
91 Flow operators
92 Intermediate operators are applied to an upstream flow and return a downstream flow
93 Creating custom intermediate operators
94 Terminal operators execute the upstream flow and may compute a value
95 Summary
96 Error handling and testing
97 Error propagation in Kotlin coroutines
98 CoroutineExceptionHandler The last resort for processing exceptions
99 Handling errors in flows
100 Testing coroutines and flows
101 Summary
102 Building Kotlin projects
103 Documenting Kotlin code
104 The Kotlin ecosystem

Homepage