Key phrases and operators. Listed here tokens will always translated as keyword phrases and should not be used as identifiers

Set 16, 2021 prices

Key phrases and operators. Listed here tokens will always translated as keyword phrases and should not be used as identifiers

Difficult search phrases

type declares a class

carry out starts a do/while cycle (hook with postcondition)

else defines the branch of an if manifestation that’s accomplished if the situation happens to be incorrect

bogus points out the ‘false’ importance of the Boolean kind

specifies the thing becoming iterated in an about loop

is used as an infix manager to check out that an advantage is associated with a variety, a variety or any other enterprise that defines the ‘contains’ approach

is utilized in once expressions for the very same factor

mark a sort quantity as contravariant

is used as an agent evaluate that an importance will not are part of a range, an assortment or any other thing that defines the ‘contains’ means

can be used in any time construction for the same factor

screen reports an interface

is utilized in when expressions for the very same intent

is utilized in if construction for the same function

null are a steady stage a thing referral that does not point out any target

correct specifies the ‘true’ valuation of the Boolean kinds

typealias declares a kind alias

typeof restricted to future make use of

val reports a read-only property or hometown varying

var reports a mutable homes or local variable

any time begins an once manifestation (executes the granted limbs)

while starts a while program (program with prerequisite)

Plush keywords and phrases

In this article tokens work as key phrases in setting after being suitable that can also be used as identifiers various other contexts:

compelling records a dynamic enter Kotlin/JS signal

value with the classroom keyword declares an inline classroom

Modifier key words

All of the following tokens work as keyword combinations in modifier records of conditions and will be utilized for identifiers some other contexts:

real denotes a platform-specific application in multiplatform work

conceptual mark a class or manhood as conceptual

annotation declares an annotation school

companion reports a companion subject

const scars a house as a compile-time consistent

enum reports an enumeration

anticipate mark a resolution as platform-specific, planning on an implementation in program components.

external spots a declaration as put in place not in Kotlin (accessible through JNI or perhaps in JavaScript)

infix makes it possible for dialing a function in infix writing

internal assists referring to the outer classroom case from a nested school

interior scars an affirmation as obvious in the current component

out mark a sort parameter as covariant

override spots an affiliate as an override of a superclass associate

public spots an announcement as noticeable just about anywhere

reified marks a kind vardeenhet of an inline work as accessible at runtime

covered reports a sealed type (a class with confined subclassing)

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

tailrec markings a work as tail-recursive (allowing the compiler to displace recursion with iteration)

Special identifiers

Listed here identifiers tends to be described by the compiler in specific contexts that can also be utilized for routine identifiers some other contexts:

field is used inside real estate accessor to mention toward the supporting discipline on the home

Operators and special signs

Kotlin supporting the next operators and special emblems:

&& , || , ! – sensible ‘and’, ‘or’, ‘not’ operators (for bitwise procedure, use corresponding infix features)

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

, > , , >= – evaluation operators (translated to contacts of compareTo() for non-primitive type)

[ , ] – found availability agent (interpreted to calls of access and set )

?. does a safe label (dubs a method or accesses a house in the event that phone is non-null)

?: require the right-hand advantage when left-hand appreciate happens to be null (the elvis user)

: sets apart a reputation from a type in declarations

? represents a kind as nullable

split the criteria and the entire body of a lambda manifestation

distinguishes the boundaries and repay kind statement in a work form

distinguishes the disorder and the body of an any time concept department

highlights or records a hook tag

highlights or references a lambda tag

; stands between a number of statements for a passing fancy line

$ references a varying or phrase in a string theme

substitutes an untouched vardeenhet in a lambda term

replacements an unused factor in a destructuring resolution

Lascia un commento