On Thu Jun 6 19:38:37 2024 +0000, Jacek Caban wrote:
Well, I expect them to behave like JS functions. If it were a JS
function, it would check to see if the object type matches, and then do its thing. If you think of it like this, it wouldn't make much sense for it to use another object type's function. I'm not talking about another objects' functions, I'm talking about separate objects having the same prototypes in JS sense but being otherwise separate implementations of the same interfaces in C.
I see, if you look at it that way it makes sense to use IID, yeah (I was thinking of the functions as complete separate entities rather than interface implementations).
I still think it's slightly better to just pass/store func_info_t as a container though—it's not just the args but everywhere else we need to store it (like in ProxyFunction as I mentioned), now it's one less field to worry about. And besides, if we ever do need to change it at some point later, it will be much easier without affecting call sites.