|
Copied to the list becasue I want to share the response to help me find a way to resolve the problem Ale -------- Mensaje reenviado --------
Hi Egor,
In object paradigm (Object Technology) the only way to interact with an object is sending messages. We/anObject impact other object sending messages. To send a message we need a receiver that is the object that will react to the message sent.
In object ORIENTED languages, e.g. languages that defines entities that are not objects, the problem impose limitations for changes during the lifetime of the system (the system is not open in all directions).
In Lua we have tables (that can be used to implement objects) and values. The values (string, function, boolean, nil) impose rigid semantics and do not let the system evolve in that corners. The case of Strings in Lua, can be patched changing the metatable of one string (all strings share the same metatable). As I know, Functions do not share a standard metatable, and we can´t apply the same mechanism to extend semantics of functions.
Changing the metatabe of each function is not a solution, because functions are allocated anytime and anywhere.
With the information & knowledge I have today on Lua, I do not see a way to extend all functions of a system modifying one object/metatable.
hope the explanation helps to understand what I need to resolve. w/best regards, Ale
El 31/08/2018 a las 17:48, Egor Skriptunoff escribió:
|