Terms “receiver” and “sender” comes from sending letter metaphor. We can think about the sender as the object which invokes a method (postman delivering an email), the receiver is the object whose method is invoked (person receiving the letter). Let’s look at a simple example:

class Car {

private val engine = Engine() fun startEngine() {

engine.start()

}

}

In above example, an instance of Engine class is receiver and instance of Car class is the sender.

Under the hood when an object receives a message, it determines what method is being requested and passes control to the method

In Kotlin we mainly talk about receiver when discussing Lambdas with receiver and Extensions. The receiver is a general term, but there are also a few more specific terms related to receivers:

Any block of code in Kotlin may have one or more receivers. It makes functions and properties of the receiver available in that block of code without qualifying it.

References

Sender/Receiver object