First off, Binding means matching the function call with the correct function definition by the compiler. This resolution takes place either at compile time or at runtime.
In early binding, the compiler matches the function call with the correct function definition at compile time.
In overload resolution, the compiler matches the function call with the correct viable function from a set of viable candidates based on some rules.
So it seems to me that both are very close and related to each other: the function is resolved at compile time but it may be called at runtime.
My questions:
- Do "early binding" and "overload resolution" equivalent?
- Does "early binding" can be implemented outside the class?
- Are early binding requires an object to call the methods,
for example:
void f(int);
void f(double);
f(1.2);
The overload resolution finds void f(double) as an exact match for f(1.2) call. But does this also mean that the call is bound early?