Proxy Tables VS Functions

Simple question. I’m trying to decide between two methods of running a function when a value of a table is changed. Method number one is just manually execute the function every time I change the tables value. This method would work okay, however I would have to writn exte ara line of code each time I want to write to a table. Also, if the function is locally in a module and the table is returned in the module, I would not be able to call the function externally. Method two, is using a proxy table. I have never used a proxy table, so I don’t know much about it but I get how its supposed to work. This seems like it would have way more benefits, but I guess what I’m really asking is if its worth it to figure out a whole proxy system for all of my tables? And if there are any downs or ups that I may be missing that could effect me later.

Have you considered writing a setter? It’s possible you can just add to your table or class a function used to both set values in it and fire events.

Though could you provide an example of what your table would be storing or how it would be used, as it might help understand better the reason you want this behavior.


I think something similar to what I posted here would work if you want to use a proxy table. With the word ‘interface’ I meant proxy. I didn’t know what term I should use. However, your proxy thing can probably be even more simple than mine. Depends on what exactly you want, though.