> What does the :internal-function-template option in define-policy does?
>
> I thought that it would behave like :interface-method-template, but
> internally, but I think I'm wrong.
Actually, interface methods are the methods you implement, and internal
functions are the methods you use. In Python terminology, the former
would be called unbound (class) methods, and the latter are bound
(instance) methods.
I hope that this clarifies the terms:
- a "policy" is an "interface" (just as in Lisp Interface Library,
https://github.com/fare/lisp-interface-library)
- an "interface" method name is an "implementation" (or "internal") method name
- an "internal" function name is an "interface" function name
For example, in arblog (
https://github.com/archimag/arblog/), with original terminology to the left and my terminology to the right:
- core/defmodules.lisp
defines policies | defines interfaces
- datastore/mongodb.lisp
implements interface methods | implements an interface
- core/admin.lisp
uses internal functions | uses interface functions
- examples/simple.lisp
binds internal functions to implementations of interface methods | binds interface functions to interface implementations
Surprising similarity between these namings serves to clarify the original terminology.