Whenever Lua attempts to access an absent field in a table,
it calls the fallback function Index
.
If the table has a field parent
with a table value,
then Lua attempts to access the desired field in this parent object.
This process is repeated ``upwards'' until a value
for the field is found or the object has no parent.
In the latter case, the previous fallback is called to supply a value
for the field.

When better performance is needed,
the same fallback may be implemented in C,
as illustrated below.