Key words and providers. Below tokens are always translated as keyword phrases and can’t be used as identifiers

Hard key phrases

type declares a class

create begins a do/while trap (loop with postcondition)

more identifies the department of an if expression that’s completed when the state try fake

false points out the ‘false’ value of the Boolean kind

determine the object are iterated in a towards program

is employed as an infix agent evaluate that an advantages is associated with a selection, a selection or any other thing that defines the ‘contains’ strategy

is employed in when expression for similar function

scars a sort parameter as contravariant

is used as a manager to check on that a worth will not participate in a range, a collection and other entity that specifies the ‘contains’ strategy

is employed in any time construction for the very same purpose

user interface declares an interface

is used in as soon as construction for similar factor

is used in any time expression for a similar goal

null is a steady representing a thing reference it doesn’t indicate any thing

real determine the ‘true’ value of the Boolean means

typealias reports a kind alias

typeof reserved for long-term make use of

val declares a read-only land or regional adjustable

var reports a mutable homes or nearby variable

any time starts an any time expression (executes various considering divisions)

while starts a long time trap (circle with precondition)

Flaccid key words

The following tokens act as key phrases in the perspective when they’re applicable and certainly will be utilized for identifiers in other contexts:

vibrant references an active enter Kotlin/JS signal

benefits with all the school search phrase reports an inline class

Modifier combination of keywords

Listed here tokens act as search phrases in modifier listings of conditions might be utilized for identifiers some other contexts:

genuine denotes a platform-specific implementation in multiplatform jobs

theoretical markings a class or user as theoretical

annotation reports an annotation course

spouse declares a companion target

const markings real estate as a compile-time consistent

enum declares an enumeration

suppose marks a testimony as platform-specific, wanting an execution in program components.

additional markings a testimony as put in place certainly not in Kotlin (accessible through JNI or in JavaScript)

infix enables contacting a function in infix writing

internal grants discussing the exterior school case from a nested lessons

internal spots a resolution as obvious in the present component

out spots a sort vardeenhet as covariant

override scars a part as a supersede of a superclass user

open public marks an affirmation as obvious anywhere

reified marks a type quantity of an inline work as accessible at runtime

covered declares a sealed class (a course with confined subclassing)

suspend markings a feature or lambda as suspending (usable as a coroutine)

tailrec spots a function as tail-recursive (creating the compiler to change recursion with iteration)

Unique identifiers

Here identifiers are actually explained because compiler in particular contexts and may be utilized for consistent identifiers in other contexts:

discipline can be used inside a property accessor to refer toward the backing subject regarding the residence

Workers and unique signs

Kotlin supporting the subsequent employees and unique representations:

&& , || , ! – sensible ‘and’, ‘or’, ‘not’ employees (for bitwise activity, utilize related infix features)

== , != – equality workers (converted to phone calls of equals() for non-primitive kinds)

, > , , >= – contrast employees (interpreted to contacts of compareTo() for non-primitive kinds)

[ , ] – listed gain access to operator (equated to messages of access along with )

?. works a secure call (phone calls a mode or accesses a home if the receiver is non-null)

?: produces the right-hand worth in the event that left-hand advantage happens to be null (the elvis agent)

: sets apart an identity from a sort in declarations

? signifies a type as nullable

distinguishes the parameters and body of a lambda appearance

classify the criteria and return type declaration in a purpose form

separates the problem and the body of an as soon as phrase branch

introduces or sources a loop tag

introduces or mention a lambda name

; stands between several reports on a single line

$ sources an adjustable or phrase in a line layout

replacements an unused vardeenhet in a lambda term

replacements an unused vardeenhet in a destructuring affirmation

Leave a Comment