On Oct 16, 2012, at 4:11 PM, Matt Gushee wrote:
> I am trying to understand the usage of module interfaces
The 'functor' facility is for generic programming.
documented? The page on modules in the manual makes no explicit association between interfaces and functors. Indeed, I don't see any hint that interfaces can be used in functor definitions the way you do in your egg.
Buried at the bottom.
Oh, okay, I see it now. I had skimmed the functors section, but missed the sentence referring to DEFINE-INTERFACE. I still think the doc could stand to be clarified a bit--e.g., with a specific example of using an interface in a functor definition. I would imagine many people are unfamiliar with functors, especially those who have not programmed in other functional languages. Though the part about interfaces is a fairly minor detail, sometimes confusion about the little things can get in the way of understanding the important concepts.
--
Matt Gushee