Table of Contents
A way to quickly navigate the Primer
Published in
3 min readSep 11, 2022
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
The Kotlin Primer now has a new home:
The links below are no longer maintained.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Introduction
Preface
Basics
Functions & Variables
Control Flow
Miscellaneous useful features
Nullability & Types
Functions continued
Classes — What we know from Java
Introduction
Properties
- Introduction [#KOTLIN FEATURE]
- Accessors [#KOTLIN FEATURE]
- Backing Fields [#KOTLIN FEATURE]
- Accessors, continued [#FYI++ #EXERCISE]
- Compile Time Constants [#FYI]
Lateinit
[#KOTLIN FEATURE]
Inheritance
- Basics [#FYI]
- Overriding [#FYI]
Miscellaneous
Generics
Classes — What‘s different
Data Classes
Objects
- Object Declarations [#KOTLIN FEATURE]
- Object Expressions [#KOTLIN FEATURE]
- Companion Objects [#KOTLIN FEATURE #EXERCISE]
Delegation
- Delegating Interface Implementation [#FUNDAMENTAL CONCEPT #EXERCISE]
- Delegated Properties [#FUNDAMENTAL CONCEPT #EXERCISE]
- Summary [#FUNDAMENTAL CONCEPT]
Sealed Hierarchies
- Introduction [#KOTLIN FEATURE]
- Safely Emulating Dynamic Dispatch [#FUNDAMENTAL CONCEPT]
- Modeling Illegal States [#FUNDAMENTAL CONCEPT]
- Modeling States and Structure [#FUNDAMENTAL CONCEPT]
- Modeling States and Structure: Considerations [#FUNDAMENTAL CONCEPT]
Miscellaneous
Extension Functions
Basics
- Motivation [#FUNDAMENTAL CONCEPT]
- Syntax and Behavior [#FUNDAMENTAL CONCEPT]
- Functions with Receiver [#FUNDAMENTAL CONCEPT]
- Qualified This [#KOTLIN FEATURE #EXERCISE]
- What Extension Functions Are Not [#FUNDAMENTAL CONCEPT]
Applications
- Nullable & Generic Receivers [#FUNDAMENTAL CONCEPT #EXERCISE]
- Generic Receivers — continued [#KOTLIN FEATURE]
- Operators as Extensions [#KOTLIN FEATURE]
Scope Functions
- Introduction [#FUNDAMENTAL CONCEPT]
also()
&apply()
[#FUNDAMENTAL CONCEPT]also()
vs.apply()
[#FUNDAMENTAL CONCEPT]let()
&takeX()
[#FUNDAMENTAL CONCEPT]run()
[#FUNDAMENTAL CONCEPT]with()
,run()
vs.with()
[#FUNDAMENTAL CONCEPT]- Closing Remarks & Exercises [#FUNDAMENTAL CONCEPT #EXERCISE]
Domain Specific Languages
Standard Library
Programming with Result
- Motivation [#FUNDAMENTAL CONCEPT]
- Returning a
Result
[#FUNDAMENTAL CONCEPT] kotlin.Result
[#FUNDAMENTAL CONCEPT]- Combining and Composing
Result
s [#FUNDAMENTAL CONCEPT] - Considerations [#FUNDAMENTAL CONCEPT]
Collections & Elementary Functional Programming
- Basic Collections: Introduction [#FYI++]
- Functional vs.? Object Oriented Programming [#FYI++]
- Collection Operations: Overview [#FYI++]
- Collection Operations: Transformations [#FYI++]
- Collection Operations: Filtering [#FYI++]
- Collection Operations: Single Element Access [#FYI++]
- Collection Operations: Predicates [#FYI++]
- Collection Operations: Aggregations [#FYI++]
- Collection Operations: Grouping [#FYI++]