Glossary

addition and assignment operator

Adds or appends the value on its righthand side to the element on its lefthand side: +=

algebraic data type

A type that allows the representation of a closed set of possible subtypes, such as an enumerated class.

(See also class, enumerated; class, sealed)

application entry point

The starting place for a program. In Kotlin, this is the main function.

argument

An input to a function.

argument, default

A value assigned to a function argument to be used if no value is provided by the caller.

argument, named

A function argument assigned a name that can be used by the caller.

arrow operator

Operator used in lambda expressions to separate parameters from the function body, in when expressions to separate the condition from the result, and in function type definitions to separate parameter types from result types: ->

assignment operator

Assigns the value on its righthand side to the element on its lefthand side: =

branch

A set of code executed conditionally.

bytecode

The lower-level language used by the Java Virtual Machine.

called on, implicitly

Called on a receiver that is scoped but not specified.

(See also scoping, relative)

class

A definition of a category of objects represented in code.

class body

The portion of a class definition, designated by curly braces, that holds its behavior and data definitions.

class function

A function defined within a class.

class property

An attribute required to represent the state or characteristics of an object.

class, abstract

A class that is never instantiated but is used to create common features among its subclasses.

class, data

A class with special features for data management.

class, enumerated

A class defining a collection of constants called enumerated types; all instances of the class are of one of the defined types. Compared to a sealed class, an enumerated class prohibits inheritance, and its subclasses cannot contain different states or have multiple instances.

(See also class, sealed; type, enumerated)

class, nested

A named class defined within another class.

class, sealed

A class with a defined set of subtypes, allowing the compiler to check whether a when expression contains an exhaustive set of branches. Compared to an enumerated class, a sealed class permits inheritance, and its subclasses can contain different states and can have multiple instances.

(See also algebraic data type; class, enumerated)

closure

Another term for a Kotlin anonymous function. Anonymous functions in Kotlin may reference local variables defined in the scope outside of the anonymous function because they persist, or close over, local variables they reference.

(See also function, anonymous)

code comment

A note in code; comments are ignored by the compiler.

collection, eager

A collection whose values are accessible when it is instantiated.

(See also collection, lazy)

collection, lazy

A collection whose values are produced only as needed.

(See also collection, eager; function, iterator)

comparison operator

An operator that compares the elements on its lefthand and righthand sides.

compilation

The translation of source code into a lower-level language to create an executable program.

compile time

See compilation.

compile-time error

An error that occurs during compilation.

(See also compilation)

compiled language

A language that is translated into machine-language instructions prior to processing by a compiler.

(See also compilation; compiler)

compiler

A program that performs compilation.

(See also compilation)

conditional expression

A conditional statement assigned to a value that can be used later.

console

A pane in the IntelliJ IDEA window that displays information about what happened when a program was executed, along with any outputs from the program. Also called the run tool window.

constant

An element that holds a value that cannot be changed.

constructor

A special function that prepares a class for use during instantiation.

constructor, primary

A class constructor defined in the class header.

consumer

A generic parameter that is writeable but not readable.

contravariance

Marking a generic parameter as a consumer.

control flow

Rules for when code should be executed.

coroutine

Experimental Kotlin feature that allows work to be performed in the background.

covariance

Marking a generic parameter as a producer.

delegate

A way of defining a template for property initialization.

destructuring

Declaring and assigning multiple variables in a single expression.

dot syntax

Syntax that connects two elements with a dot (.); used when calling a function defined on a type and when referring to a class property.

editor

The main area of the IntelliJ IDEA window, where code can be entered and edited.

encapsulation

The principle that an object's functions and properties should be visible to other objects only as needed. Also the process of hiding function and property implementations using visibility modifiers.

equality, referential

Of two variables: referring to the same type instance.

(See also equality, structural)

equality, structural

Of two variables: having the same value.

(See also equality, referential)

escape character

Distinguishes characters that have special meaning to the compiler: \

event log tool window

A pane in the IntelliJ IDEA window that displays information about what IntelliJ did to make a program ready to run.

exception

A disruption to the execution of a program; an error.

exception, unchecked

An exception generated by code that is not wrapped in a try/catch statement.

exception, unhandled

An exception that is not managed in the codebase.

expression

A combination of values, operators, and functions that produces another value.

extend

Gain functionality through inheritance or interface implementation.

extension

A property or function added to an object without inheritance.

field

Storage for the data associated with a property.

floating point

A number represented using a decimal that can be positioned at an arbitrary place based on its significant digits.

function

A reusable portion of code that accomplishes a specific task.

function body

The portion of a function definition, designated by curly braces, that holds its behavior definitions and return type.

function call

A line of code that triggers a function and passes it any necessary arguments.

function call, chainable

A function call that returns its receiver or another object that a subsequent function can be called on.

function header

The part of a function definition that includes the visibility modifier, function declaration keyword, name, parameters, and return type.

function inlining

A compiler optimization commonly used to reduce the memory overhead for functions that accept anonymous functions as arguments.

function overloading

Defining two or more function implementations with the same name and scope but different parameters.

function reference

A named function converted to a value that can be passed as an argument.

function type

The type of an anonymous function, defined by its input, output, and parameters.

function, abstract

A function declared without an implementation in an abstract class.

(See also class, abstract)

function, anonymous

A function defined without a name; often used as an argument to another function.

(See also function, named)

function, combining

A function that takes multiple collections and combines them into a single new collection.

function, composable

A function that can be combined with other functions.

function, extension

A function that adds functionality to a particular type.

function, filter

A function that works on the contents of a collection by applying a predicate function to check a condition for each element; elements for which the predicate returns true are added to a new collection returned by the filter function.

function, iterator

A function referred to each time a value is requested from a lazy collection.

function, mutator

A function that changes the contents of a mutable collection.

function, named

A function defined with a name.

(See also function, anonymous)

function, precondition

A Kotlin standard library function that defines conditions that must be met before some code is executed.

function, single-expression

A function with a single expression.

(See also expression)

function, transform

In functional programming, a function that works on the contents of a collection by transforming each element using its transformer function; transform functions return a modified copy of the collection they are called on.

(See also functional programming)

function, transformer

In functional programming, the anonymous function passed to a transform function that specifies the action to be taken on each element in the collection the transform is called on.

(See also functional programming)

functional programming

A style of programming that relies on higher-order functions, designed to work on collections, that are chained to create complex behavior.

generic type

A class that accepts a generic input - i.e., an input of any type.

generic type parameter

The parameter specified for a generic type, such as <T>.

generics

A type system feature that allows functions and types to work with unknown types.

getter

A function defining how a property is read.

higher-order function

A function that takes another function as an argument.

imperative programming

The programming paradigm that includes object-oriented programming.

increment operator

Adds 1 to the value of the element it is affixed to: ++

index

An integer corresponding to the position of an element in a series.

indexed access operator

Gets the element at a particular index from a collection: []

inheritance

An object-oriented programming principle in which the properties and behavior of classes are shared by their subclasses.

initialization

Preparation of a variable, property, or class instance for use.

initialization, late

Initialization of a variable that is delayed until its value is assigned.

initialization, lazy

Initialization of a variable that is delayed until it is first accessed.

initializer block

A block of code, prefixed with init, that will be executed during initialization of an object instance.

instance

A particular occurrence of an object.

instantiate

Create an instance of.

interface

A set of abstract functions and properties used to create common features among objects not related by inheritance.

interoperate

Interact with another programming language natively.

iteration

Repeating a process, as for each element in a range or collection.

Kotlin REPL

A tool in IntelliJ IDEA that allows code to be tested without creating a file or running a complete program.

Kotlin standard library functions

A set of extension functions available for use with any Kotlin type.

lambda

Another term for an anonymous function.

(See also function, anonymous)

lambda expression

Another term for an anonymous function's definition.

(See also function, anonymous)

lambda result

Another term for an anonymous function's return.

(See also function, anonymous)

logical operator

A function or operator symbol that performs a logical operation on its input(s).

logical ‘and’ operator

Returns true if and only if the elements on its lefthand and righthand sides are both true: &&

logical ‘or’ operator

Returns true if either of the elements on its lefthand and righthand sides is true: ||

method

Java terminology for a function.

(See also function)

module

A discrete unit of functionality that can be run, tested, and debugged independently.

modulus operator

Returns the remainder when one number is divided by another; also called the remainder operator: %

mutable

Able to be changed.

(See also read-only)

non-null assertion operator

Calls a function on a nullable element, returning an exception if the element it is called on is null: !!

non-nullable

Unable to be assigned a null value.

null

Nonexistent.

null coalescing operator

Returns the element on its lefthand side if it is non-null; otherwise returns the element on its righthand side: ?:

nullable

Able to be assigned a null value.

object declaration

A named singleton created with the object keyword.

(See also object, companion; object expression; singleton)

object expression

An unnamed singleton created with the object keyword.

(See also object, companion; object declaration; singleton)

object, companion

An object defined within a class and marked with the companion modifier; companion objects allow their members to be accessed by referencing the outer class name only.

(See also object declaration; object expression; singleton)

operator overloading

Defining an implementation for an operator function on a custom type.

override

Provide a custom implementation for an inherited function or property.

parameter

An input required by a function.

parameterized type

The type defined for the contents of a collection.

pass an argument

Provide an input to a function.

platform type

Ambiguous types returned to Kotlin from Java code; they may be nullable or non-nullable.

polymorphism

The ability to use the same named entity (such as a function) to produce different results.

predicate

A true/false condition provided to a function as a lambda to define how work should be performed.

producer

A generic parameter that is readable but not writeable.

project

All the source code for a program, along with information about dependencies and configurations.

project tool window

The pane on the left of the IntelliJ IDEA window that shows a project's structure and files.

property, computed

A property defined such that its value is computed each time it is accessed.

property, inline

A class property defined in the primary constructor.

race condition

A condition that occurs when some state is modified simultaneously by two or more elements in a program.

range

A sequential series of values or characters.

read-only

Able to be read but not changed.

(See also mutable)

receiver

The subject of an extension function.

receiver type

The type an extension adds functionality to.

refactor

Change the presentation or location of code without changing its functionality.

referential equality operator

Evaluates whether the variable on its lefthand side points to the same type instance as the value on its righthand side: ===

(See also equality, referential)

reflection

Learning the name or type of a property at runtime.

(See also type erasure)

regular expression, regex

A defined character search pattern.

remainder operator

See modulus operator.

reserved keyword

A word that cannot be used as a function name.

return type

The type of output data a function returns after completing its work.

return, implicit

Data that is returned without an explicit return statement.

run tool window

A pane in the IntelliJ IDEA window that displays information about what happened when a program was executed along with any outputs from the program. Also called the console.

runtime

When a program is executed.

runtime error

An error that occurs after compilation, during program execution.

safe call operator

Calls a function only if the element it is called on is non-null: ?.

scope

The portion of a program in which an entity, such as a variable, can be referred to by name.

scoping, relative

The scoping of standard function calls within a lambda to the receiver the lambda is called on.

(See also called on, implicitly)

setter

A function defining how a property's value is assigned.

signed numeric type

A numeric type that includes both positive and negative values.

singleton

An object declared with the object keyword; singletons are limited to a single instance throughout program execution.

smart casting

The tracking by the compiler of information that has been checked for a branch of code, such as whether a variable has a null value.

statement

An instruction in code.

string

A sequence of characters.

string concatenation

Combining two or more strings in a single output.

string interpolation

Using a string template.

string template

Syntax that allows a variable name to stand in for its value in a string.

structural equality operator

Evaluates whether the value on its lefthand side is equal to the value on its righthand side: ==

(See also equality, structural)

subclass

A class defined as inheriting properties from another class.

superclass

The class that a subclass inherits from.

target (a platform)

Design a program to run on a platform.

throw (an exception)

Generate an exception.

type

A classification of data; a variable's type determines the nature of the values it can hold.

type casting

Treating an object as though it were an instance of a different type.

type checking

Confirmation by the compiler that the value assigned to a variable is of the correct type.

type checking, static

Type checking performed as code is entered or edited.

type erasure

The loss of type information for generics at runtime.

type inference

The ability of the compiler to recognize a variable's type based on the value assigned to it.

type system, static

A system in which the compiler labels source code with type information for checking.

type, enumerated

A type defined as one of the elements of an enumerated class.

(See also class, enumerated)

types, collection

Data types that represent groups of data elements, such as lists.

Unicode character

A character defined in the Unicode system.

variable

An element that holds a value; variables may be read-only or mutable.

variable, file-level

A variable defined outside of any function or class.

variable, local

A variable defined within a function's scope.

visibility

The accessibility of an element from other code elements.

visibility modifier

A modifier added to function and property declarations to set their visibility.

zero-indexed

Using the value 0 for the first index (in a series or collection).