Keyword phrases and operators. The next tokens act as keyword in modifier email lists of conditions and certainly will be used as identifiers some other contexts:

Keyword phrases and operators. The next tokens act as keyword in modifier email lists of conditions and certainly will be used as identifiers some other contexts:

Hard combination of keywords

Here tokens will always be interpreted as keyword combinations and cannot be utilized for identifiers:

course declares a class

manage starts a do/while cycle (trap with postcondition)

more describes the branch of an if term that is definitely performed after issue try false

bogus specifies the ‘false’ worth of the Boolean kind

points out the item getting iterated in an as trap

is employed as an infix driver to check that a benefits is associated with an assortment, a group or any other entity that specifies the ‘contains’ system

is employed in once construction for similar function

scars a kind factor as contravariant

is used as a driver to test that a benefits don’t belong to a variety, an assortment or another organization that specifies the ‘contains’ way

is utilized in if expressions for the very same intent

software reports a screen

is employed in whenever expression for a similar intent

is employed in if construction for the very same goal

nothing is definitely a constant presenting a subject mention that does not suggest any target

accurate points out the ‘true’ importance of the Boolean kind

typealias declares a kind alias

typeof restricted to future usage

val declares a read-only assets or nearby adjustable

var reports a mutable assets or neighborhood varying

whenever starts a whenever concept (performs among provided limbs)

while begins a little while trap (loop with prerequisite)

Mellow keyword combinations

Here tokens act as search phrases when you look at the framework when they’re pertinent and certainly will be utilized for identifiers some other contexts:

dynamic mention a dynamic enter Kotlin/JS laws

price using lessons search phrase reports an inline type

Modifier combination of keywords

actual means a platform-specific implementation in multiplatform projects

abstract scars a category or user as abstract

annotation reports an annotation course

companion declares a friend subject

const markings a property as a compile-time continual

enum reports an enumeration

count spots a declaration as platform-specific, planning on an application in platform components.

outside markings a testimony as used certainly not in Kotlin (accessible through JNI or even in JavaScript)

infix brings dialing a function in infix writing

interior lets discussing the exterior lessons incidences from a nested school

internal marks a testimony as visible in today’s component

out spots a type parameter as covariant

supersede scars an associate as an override of a superclass representative

people marks a declaration as noticeable anyplace

reified spots a kind parameter of an inline function as accessible at runtime

secured reports an enclosed type (a class with restricted subclassing)

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

tailrec scars a function Bristol sugar daddy websites as tail-recursive (enabling the compiler to change recursion with iteration)

Particular identifiers

The next identifiers are actually outlined through the compiler in specific contexts and will be utilized for consistent identifiers some other contexts:

industry can be used inside a property accessor to refer toward the assistance subject of the property

Employees and particular emblems

Kotlin holds all of the following operators and special representations:

&& , || , ! – logical ‘and’, ‘or’, ‘not’ workers (for bitwise procedures, use matching infix capabilities)

== , != – equivalence employees (converted to telephone calls of equals() for non-primitive sorts)

, > , , >= – review employees (translated to telephone calls of compareTo() for non-primitive types)

[ , ] – indexed gain access to manager (equated to contacts of attain and set )

?. executes a safe name (telephone calls a method or accesses a residential property if your individual is non-null)

?: takes the right-hand price in the event that left-hand advantages was null (the elvis driver)

: classify a name from a kind in declarations

? scratches a type as nullable

split the boundaries and body of a lambda appearance

distinguishes the guidelines and homecoming sort statement in a function kinds

distinguishes the problem and body of an as soon as term branch

presents or records a hook tag

presents or references a lambda tag

; separates a number of reports for a passing fancy range

$ records a changeable or phrase in a string template

substitutes an abandoned parameter in a lambda term

substitutes an empty vardeenhet in a destructuring announcement