The two positions I rotate between is thinking of them as classes/objects (bags of state and methods that operate on that state, which mostly works fine if you squint) and thinking of them as tables.

The idea with embracing “tables” is that I say ok - this is a table with a bunch of key/values. Some are values, some are functions. The method “:” syntax is nice sugar to hand functions their current table. If an entry is missing it runs the stuff in metatable. Or in other words, I try to stop myself from making analogies and instead embrace the language as-is. YMMV

3 Likes