We can use a name (or identifier) to refer to an entity. For instance, if we write:
1 2 3 4 5 6 7 8
|
#include <cstring>
const char my_c_string[] = "abcd" ;
int main()
{
return std::strlen( my_c_string ) ;
}
|
In
std::strlen( cstr ) ;
, we are using two names - the name
std::strlen
and the name
my_c_string
. The process of association of specific entities with names is called 'binding' or 'name binding'.
In the above example, the name
std::strlen
when bound refers to a particular function, and the name
my_c_string
is bound to refer to an object (an array of const chars).
If this binding is done before the program actually starts running (as in the above two cases), the binding is said to be 'static' or 'early'. If the binding is done after the program starts running (typically each time the name is encountered), the binding is said to be 'dynamic' or 'late'.
> what does it have to do with recursion?
Nothing very special. In recursion 101, a function calls itself by using the name of the very same function; and the name binding for the recursive call is done early, at compile-time.