Well thank you very much! I appreciate the kind sentiment!
> Any problem in computer science can be solved with another level of indirection.
Indeed! I forgot to include this part when writing, it was "at the tip of my consciousness" but I couldn't recall that exact text exactly, so I didn't include it -- but you nailed it!:
>https://en.wikipedia.org/wiki/Fundamental_theorem_of_softwar...
>An entire operating system conceptualized as a hierarchy of handles.
It's quite the concept isn't it!
Incidentally, if you look at the Assembly compiler output of any "Object-Oriented" programming language (i.e., C++, ObjectPascal, etc.), you will notice that it is generating what looks like normal Assembly functions for non-Object-Oriented programming languages (C, Pascal, etc.), except that each function is getting passed an additional first parameter (typically as EAX on 32-bit x86 systems, RAX on 64-bit x86 systems), and that first parameter is actually a pointer to the "Object" in memory (pointer to a data structure that comprises the "Object" in memory -- since Assembler has no concept of higher-level programming language Objects!), but it's function is to allow a flat traditional function to operate on the data (and call associated related "object" functions (via another level of pointer indirection)) -- well, it's the same principle as a Handle (that of "Indirection": https://en.wikipedia.org/wiki/Indirection) in effect!
>It's about encapsulation, and designing the interface between objects.
Indeed!
>How handles are like functions, makes me think. A function is a form of indirection, and it can be seen as a handle or interface with defined types of inputs and outputs.
Exactly!
>And the useful of handles/proxies in testing. Yes, it solves the same question as "dependency injection" but in a more functional style.
You get "dependency injection" virtually for free!
>You pass in a handle with well-defined types of vaues, which can be treated the same way by functions whether the handle operates with a local test database or the actual production one. It's being able to have multiple implementations, or instances, with the same interface.
Yes! And (added bonus!) it decouples the handle using program (client) from the handle serving program (server!). That is, the code is not as strongly linked "bind/bound together" as code using raw pointers, and can be separated across boundaries (across processes on a single machine, across the internet on multiple machines) if the data is marshalled (fancy term for if the data of the variable which contains the integer value for the Handle is moved from point A to point B, wherever point A and B are, i.e., HTTP(S) request + JSON or XML or BSON or other structured data exchange format...)
Anyway, thank you again for your kind sentiments!