liveBook · Manning

Function overloading

Function overloading is defining multiple callable operations with the same name but different parameter signatures, with behavior selected according to the call.

How 3 Manning books explain it

100 Java Mistakes and How to Avoid Them

A method overload is one of multiple methods with the same name but different parameter lists in a class or interface.

How it is used
Prevents unintended Java call binding when overloaded methods, constructors, method references, or boxed numeric arguments obscure the selected signature.
How deep it goes
Explains overload selection through focused failures and corrections, without detailing Java's full overload-resolution rules.
Examples
Uses `StringBuilder::new` in `computeIfAbsent`, `List<Integer>.remove(0)`, and `process(Object)` alongside typed overload migration.
What you can do after
Diagnose/debug with it by exposing target parameters, forcing intended argument types, checking parameter hints, and migrating broad APIs to typed overloads.

Read how 100 Java Mistakes and How to Avoid Them explains function overloading →

Software Design for Python Programmers

Function overloading is providing the same operation through multiple signatures or argument forms with behavior selected according to the call.

How it is used
Uses one name for closely related operations that accept different argument counts or datatypes.
How deep it goes
Explains naming criteria, Python's replacement behavior, runtime checks, and decorator-based dispatch, stopping short of formal language semantics.
Examples
Demonstrates overloaded area calculations, line lengths from points and coordinate containers, the plus operator, and len().
What you can do after
Build it from scratch using runtime checks or the multimethod decorator to dispatch related calls by argument form and datatype.

Read how Software Design for Python Programmers explains function overloading →

Object-Oriented Software Design in C++

The definition of multiple functions with the same name but different parameter lists or signatures in a scope.

How it is used
Uses one name for closely related operations whose behavior varies with argument types or counts.
How deep it goes
Explains signatures, compiler selection, and suitable behaviors through compact C++ examples.
Examples
Demonstrates print, draw_circle, search, sqrt, and overloaded operators for arithmetic, strings, and enumerations.
What you can do after
Apply function overloading in C++ when related operations need distinct parameter signatures under one name.

Read how Object-Oriented Software Design in C++ explains function overloading →

Related concepts

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.