Learning Kotlin: Introduction
I have recently decided to start learning Kotlin, and have started with the Koans. Koans are simple unit tests that help ease you into learning a new language. The first step was setting this up on Windows and VSCode... though for some reason, I hate myself that much. 😤
Requirements
- Install Java SDK
- Install the Java Extension Pack for VSCode
- Install the Kotlin Language Extension for VSCode
Using
I’m using VSCode as my editor and the command line to run the unit tests.
Parts
Since this will be ongoing, I’ll break it into a number of parts, listed below (this list will be updated over time):
- Hello World
- Java to Kotlin Converter
- Named Arguments
- Default Values
- Lambdas
- String Templates
- Data Classes
- Nullable Types
- Smart Casts
- Extension Functions and Extensions on Collections
- Object Expressions and SAM Conversions
- Kotlin’s Elvis Operator
- Return
when - The Awesome Backtick
/learning-kotlin-awesome-backtick - Collections
- The
itThing - Operators
- Operators Don’t Need to Mean One Thing
- Destructuring
- For Loop
- Invoke
- Looking at the
inOperator &contains - The
..Operator - Todo
byDelegate Properties- The Lazy Delegate
- The Observable Delegate (with a slight detour on reference functions)
- The Map Delegate
- The Vetoable Delegate
- The
notnullDelegate andlateinit