Keyword phrases and operators. In this article tokens are normally construed as key and cannot be utilized for identifiers

Tricky key phrases

school declares a course

carry out begins a do/while loop (hook with postcondition)

otherwise determine the division of an if phrase that is definitely executed whenever the disease was bogus

false determine the ‘false’ worth of the Boolean kinds

points out the item being iterated in a towards circle

is utilized as an infix operator to check out that a benefits is owned by an assortment, a series and other enterprise that determine the ‘contains’ process

is utilized in once expressions for a similar goal

markings a type parameter as contravariant

is employed as an owner to determine that an advantage cannot are part of a selection, a series or any other enterprise that describes the ‘contains’ strategy

is used in any time construction for similar objective

user interface declares a software

is used in any time expression for the same function

is utilized in once expressions for the very same goal

nothing is definitely a constant presenting a thing mention that does not point out any subject

genuine specifies the ‘true’ property value the Boolean kind

typealias reports a kind alias

typeof reserved for foreseeable utilize

val reports a read-only home or regional varying

var declares a mutable assets or regional varying

when starts an once appearance (performs the given divisions)

while starts months loop (hook with prerequisite)

Flaccid key

This tokens behave as keyword phrases when you look at the situation while they are suitable and can be utilized for identifiers in other contexts:

vibrant references a compelling enter in Kotlin/JS laws

worth making use of the classroom keyword or phrase reports an inline lessons

Modifier search phrases

Below tokens become keyword phrases in modifier lists of declarations and that can be used as identifiers some other contexts:

real means a platform-specific setup in multiplatform projects

conceptual mark a class or associate as conceptual

annotation reports an annotation type

companion declares a friend subject

const markings a property as a compile-time continuous

enum declares an enumeration

trust marks an affirmation as platform-specific, expecting a setup in platform components.

external mark a resolution as implemented maybe not in Kotlin (accessible through JNI or in JavaScript)

infix permits contacting a features in infix writing

inner helps discussing the outside type case from a nested classroom

inner marks a declaration as apparent in today’s module

out spots a type parameter as covariant

supersede spots an affiliate as a supersede of a superclass member

community represents a declaration as apparent just about anywhere

reified mark a type vardeenhet of an inline be easily accessible at runtime

sealed reports a closed course (a course with restricted subclassing)

suspend scars a function or lambda as suspending (usable as a coroutine)

tailrec spots a be tail-recursive (allowing the compiler to change recursion with iteration)

Special identifiers

The following identifiers tends to be outlined through compiler in particular contexts and that can be utilized for consistent identifiers some other contexts:

area is employed inside home accessor to refer toward the supporting niche for the land

Workers and particular designs

Kotlin helps the below providers and specialized designs:

&& , || , ! – reasonable ‘and’, ‘or’, ‘not’ workers (for bitwise functions, make use of matching infix works)

== , != – equivalence providers (interpreted to telephone calls of equals() married hookup apps 2018 for non-primitive sorts)

, > , , >= – review workers (interpreted to telephone calls of compareTo() for non-primitive varieties)

[ , ] – indexed availability manager (equated to calls of get and place )

?. does a good phone call (calls a technique or accesses home when the radio was non-null)

?: normally takes the right-hand price when left-hand value is null (the elvis agent)

: sets apart an identity from a type in declarations

? represents a sort as nullable

separates the parameters and the entire body of a lambda expression

separates the boundaries and generate sort statement in a purpose type

distinguishes the condition and the body of an once expression division

highlights or sources a trap label

presents or records a lambda label

; separates a number of assertions for a passing fancy range

$ sources a variable or phrase in a line theme

substitutes an empty parameter in a lambda expression

substitutes an empty quantity in a destructuring declaration