Receiver
A receiver is an entity or value designated to accept a message, signal, or operation.
The Well-Grounded Rubyist, Fourth Edition
An explicit receiver is the object written before the dot in a Ruby method call.
- How it is used
- Identifies which object receives a Ruby method call, including calls that rely on `self` instead of an explicit object.
- How deep it goes
- Explains explicit and default receivers through method-call syntax and worked class and instance examples, without descending into method-dispatch internals.
- Examples
- Uses string conversion, calls between instance methods, a composed name, and array-combining operations.
- What you can do after
- Diagnose/debug with it by identifying the object a call targets and distinguishing changes to an array receiver from variable reassignment.
Read how The Well-Grounded Rubyist, Fourth Edition explains receiver →
Kotlin in Action, 2E
- How it is used
- Uses receivers to add Kotlin-style operations to existing classes and to make builder-style lambdas readable.
- How deep it goes
- Explains receiver types, receiver objects, implicit this, lambda invocation, encapsulation limits, and Java compilation behavior.
- Examples
- Uses String.lastChar, buildString with StringBuilder, stored appendExcl, and a Java call to StringUtilKt.lastChar.
- What you can do after
- Apply Kotlin extension functions and receiver lambdas while translating their calls to Java static-method syntax.
100 Go Mistakes and How to Avoid Them
A receiver is the parameter of a Go method that identifies the value or pointer on which the method operates.
- How it is used
- Guides Go method design by distinguishing copied receivers from receivers that can mutate the original object.
- How deep it goes
- Explains copying, mutation, deferred evaluation, and selection conditions while deferring thorough value-versus-pointer performance treatment.
- Examples
- Uses customer balances, slice appending, nested pointer data, and deferred printing to expose receiver behavior.
- What you can do after
- Apply it by selecting value or pointer receivers based on mutation, copying constraints, receiver size, and deferred-call behavior.
Read how 100 Go Mistakes and How to Avoid Them explains receiver →
Also covered in
- Go in Practice, Second Edition
- Learn Go with Pocket-Sized Projects
- Go in Action, Second Edition
- Idiomatic Rust
What to know first
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
Related concepts
- extensionused by · An extension is a language feature that lets functionality be defined outside a type's original declaration and called using that type's member-like syntax, without modifying the type.
- default receiverincludes · A default receiver is the implicit object to which a Ruby method call is sent when no receiver is written.
- methodpart of · A method is a callable function or operation associated with a type, class, or object and invoked through that association.
- pointer receiverincludes · A pointer receiver is a method receiver whose parameter is a pointer to a value, allowing the method to access or modify that value.
- method callpart of · A method call is an expression that invokes a method associated with an object, value, or type, optionally supplying arguments.
Questions about receiver
What is receiver?
A receiver is an entity or value designated to accept a message, signal, or operation.
Which Manning books explain receiver?
The Well-Grounded Rubyist, Fourth Edition, Kotlin in Action, 2E and 100 Go Mistakes and How to Avoid Them.
What should I know before learning receiver?
Manning books that teach receiver usually introduce function first.
What kinds of receiver are there?
Kinds of receiver include default receiver and pointer receiver.
What is receiver part of?
Receiver is part of method. A method is a callable function or operation associated with a type, class, or object and invoked through that association.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


