October 2021
Intermediate to advanced
500 pages
16h 23m
English
Kotlin includes a feature that might, at first glance, seem slightly peculiar: the ability to define or invoke a function named using spaces and other unusual characters, so long as they are surrounded using the backtick symbol, `. For example, you can define a function like this:
fun `**~prolly not a good idea!~**`() {
...
}
And you could then invoke `**~prolly not a good idea!~**` like this:
`**~prolly not a good idea!~**`()
Why is this feature included? You should never name a function anything like `**~prolly not a good idea!~**`. (Nor with an emoji. Please backtick responsibly.) There are several valid reasons the function name backticks exist.
The first is to support ...
Read now
Unlock full access