You don't even need the data structure since you can simulate that with functions too in order to make a basic object system. Consider a simple example like this:
Plenty of people have said data structures are a poor mans functions. I think it's in that famous list of programmer quotes collected by alan perlis that everyone inevitably comes across at some point.
In many cases where you want object orientation something like this will be sufficient. No need to go the whole way with inheritance and whatnot.
You know, even when I did use OOP, I avoided inheritance altogether and stuck with containment instead. The semantics seemed clearer to me, and I later read some essays from excellent programmers who shared my sentiments.
Nice trick with your little module-in-a-box there. I think it's roughly analogous to the technique I used in my "handy_module" example here: http://news.ycombinator.com/item?id=2580717 .
That's right, we are both using the same technique.
It's interesting to note though that the difference between this and a data structure is not that great. I haven't looked into it but I'm certain I've read somewhere that data structures as implemented in racket (which is what my example is written in) actually desugar into something like my example code.
I still like to use this technique here and there, especially when there will only be one copy of the structure in use in my program. This is because it's simply more convenient to write something like (counter++) rather than declaring a global COUNTER and typing in (set! COUNTER (add1 COUNTER)) etc.
In many cases where you want object orientation something like this will be sufficient. No need to go the whole way with inheritance and whatnot.