KtKotlin

Kotlin glossary – key terms explained

Coroutine

A lightweight, suspendable computation for simple concurrency, without one thread per task.

data class

A class for data: automatically generates equals, hashCode, toString, copy, and destructuring.

Delegation (by)

An interface or a property is delegated to another object: Drucker by d, val x by lazy { }.

Elvis operator (?:)

Returns the left value if it is not null, otherwise the right one: name ?: "unknown".

Extension function

A function that extends an existing type from the outside: fun String.istLeer() = ....

Flow

A cold, asynchronous data stream from kotlinx.coroutines: flow { emit(x) } and collect.

Gradle

A build tool that uses the Kotlin DSL (build.gradle.kts) to manage dependencies, compile, and test.

Higher-order function

A function that takes other functions as parameters or returns them, e.g. map, filter.

JVM

Java Virtual Machine: executes the bytecode produced by Kotlin – Kotlin/JVM is the most widespread variant.

Kotlin Multiplatform

Shared Kotlin code for Android, iOS, web, and server with platform-specific parts.

Lambda

An anonymous function like { x -> x * 2 }; with a single parameter, it is called it.

Null safety

The type system distinguishes String (never null) from String? (can be null) and thereby prevents many NullPointerExceptions.

object / companion object

object is a singleton; a companion object replaces the static members of a class.

Safe call (?.)

Calls a method or property only if the object is not null; otherwise the expression evaluates to null.

Scope function

let, run, with, apply, also: they execute a block in the context of an object.

sealed class/interface

A type with a fixed, known set of subtypes; a when over it can be checked for completeness by the compiler.

Sequence

A lazily evaluated series of elements – avoids intermediate lists in long operation chains.

Smart cast

After a check (is, != null), the compiler remembers the more specific type and converts automatically.

Structured concurrency

Coroutines belong to a scope that waits for all children and propagates cancellation and errors.

suspend

A modifier for functions that can pause without blocking the thread.