Skip to content
The Kotlin Primer
Menu
Menu
Introduction
· Understanding the Kotlin Primer
· Maintainability
Basics
Functions & Variables
· Functions
· Variables
Control Flow
· When expression
· Loops
· If expression
Miscellaneous
· Ranges
· Strings & string templates
Nullability & Types
· Nullability
· Types
Functions continued
· Literals
· Function types & literals
· Inline functions
· Tail-recursive functions
· Variable number of arguments
Classes — What we know from Java
Introduction
· Basic class syntax
· Constructors
Properties
· Basics
· Accessors
· Backing fields
· Accessors, continued
· Compile-time constants
· Lateinit
Inheritance
· Basics
· Overriding
Miscellaneous
· Interfaces
· Visibility modifiers
· Nested and inner classes
Generics
· Basics
· Generic variance – motivation
· Generic variance – fundamental principles
· Covariance, Contravariance, Invariance
· Star Projections
Classes — What’s new in Kotlin
Data Classes
· Data Classes
Objects
· Object Declarations
· Object Expressions
· Companion Objects
Delegation
· Delegating interface implementation
· Delegated Properties
· Summary
Sealed hierarchies
· Introduction
· Safely Emulating Dynamic Dispatch
· Modeling Illegal States
· Modeling States and Structure
· Modeling States and Structure: Considerations
Miscellaneous
· Reified Type Parameters
· Enums
· Infix Functions
· Operators
· Type Aliases
· Inline (Value) Classes
· Functional (SAM) Interfaces
Extension Functions
Basics
· Motivation
· Syntax and Behavior
· Functions with Receiver
· Qualified This
· What Extension Functions Are Not
Applications
· Nullable & Generic Receivers
· Generic Receivers — continued
· Operators as Extensions
Scope functions
· Introduction
· also() & apply()
· also() vs. apply()
· let() & takeX()
· run()
· with(), run() vs. with()
· Closing Remarks & Exercises
Domain Specific Languages
· What makes a DSL
· How to make your own
Standard Library
Programming with Result
· Motivation
· Returning a Result
· kotlin.Result
· Combining and Composing Results
· Considerations
Collections & Elementary Functional Programming
· Basic Collections: Introduction
· Functional vs. (?) Object-Oriented Programming
· Collection Operations: Overview
· Transformations
· Filtering
· Single-element access
· Predicates
· Aggregators
· Grouping
Sequences
· Why we need them
· How They Work & How To Use Them
· Yield vs. Return & How Pausing Functions Work
· Iterable vs. Sequence vs. Java Stream
Functions & Variables
· Functions
· Variables
Search for:
The Kotlin Primer
Search
Introduction
· Understanding the Kotlin Primer
· Maintainability
Basics
Functions & Variables
· Functions
· Variables
Control Flow
· When expression
· Loops
· If expression
Miscellaneous
· Ranges
· Strings & string templates
Nullability & Types
· Nullability
· Types
Functions continued
· Literals
· Function types & literals
· Inline functions
· Tail-recursive functions
· Variable number of arguments
Classes — What we know from Java
Introduction
· Basic class syntax
· Constructors
Properties
· Basics
· Accessors
· Backing fields
· Accessors, continued
· Compile-time constants
· Lateinit
Inheritance
· Basics
· Overriding
Miscellaneous
· Interfaces
· Visibility modifiers
· Nested and inner classes
Generics
· Basics
· Generic variance – motivation
· Generic variance – fundamental principles
· Covariance, Contravariance, Invariance
· Star Projections
Classes — What’s new in Kotlin
Data Classes
· Data Classes
Objects
· Object Declarations
· Object Expressions
· Companion Objects
Delegation
· Delegating interface implementation
· Delegated Properties
· Summary
Sealed hierarchies
· Introduction
· Safely Emulating Dynamic Dispatch
· Modeling Illegal States
· Modeling States and Structure
· Modeling States and Structure: Considerations
Miscellaneous
· Reified Type Parameters
· Enums
· Infix Functions
· Operators
· Type Aliases
· Inline (Value) Classes
· Functional (SAM) Interfaces
Extension Functions
Basics
· Motivation
· Syntax and Behavior
· Functions with Receiver
· Qualified This
· What Extension Functions Are Not
Applications
· Nullable & Generic Receivers
· Generic Receivers — continued
· Operators as Extensions
Scope functions
· Introduction
· also() & apply()
· also() vs. apply()
· let() & takeX()
· run()
· with(), run() vs. with()
· Closing Remarks & Exercises
Domain Specific Languages
· What makes a DSL
· How to make your own
Standard Library
Programming with Result
· Motivation
· Returning a Result
· kotlin.Result
· Combining and Composing Results
· Considerations
Collections & Elementary Functional Programming
· Basic Collections: Introduction
· Functional vs. (?) Object-Oriented Programming
· Collection Operations: Overview
· Transformations
· Filtering
· Single-element access
· Predicates
· Aggregators
· Grouping
Sequences
· Why we need them
· How They Work & How To Use Them
· Yield vs. Return & How Pausing Functions Work
· Iterable vs. Sequence vs. Java Stream
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
Ok