5 ms·
Attempted Summary: Black boxes are hard to reuse because the hidden implementation details impact the client e.g. GUIs don't scale to thousands of windows, LRU
by extension 15y ago
Attempted Summary:
Black boxes are hard to reuse because the hidden implementation details impact the client e.g. GUIs don't scale to thousands of windows, LRU caching is sometimes not optimal.
The proposed solution is "meta-interfaces" that let the client control how the interface maps to an implementation. For example, a cache could represent pages with objects that participate in swapping policy. The client could subclass the page class to provide a custom policy. It's important to separate the base/meta interfaces.
Some other more exotic forms of meta-interface are mentioned involving reflection and dynamic code generation, but no real details are given. It's also acknowledged that the OO approach often results in fragmentation i.e. too many objects.
My thoughts:
The meta-interface concept is pervasive today, in the form of composable object models and dependency injection. But these models are still hard to design and suffer from the fragmentation problem.
- swannodette 15y agoI take it you're not familiar with Kiczales's work, Art Of The Metaobject Protocol, nor his work on Aspect Oriented Programming. The meta-interface concepts that are "pervasive" today exist in a crippled form compared to what is being described here.
- extension 15y agoWhy would you assume that? I know of those things and they haven't penetrated much in the 17 years since that presentation. But the patterns they embody have at least become common in the more popular and impoverished languages. This reveals their value to the masses and drives their acceptance as first-class language features.
- swannodette 15y agoMy impression of why these things haven't penetrated in 17 years - * Few people program in Common Lisp * AspectJ is an extension to Java
- danssig 15y agoI think Aspects have penetrated pretty well via Spring. They're probably used more for logging than anything else, but it's something.
- cwzwarich 15y agoThe problem with a MOP is that it is so general that it is possible to do anything and thus impossible to reason about anything. Kiczales gave an interesting retrospective talk where he talks about this subject and more: http://bc.tech.coop/blog/060709.html http://bc.tech.coop/blog/060709.html
- swannodette 15y agoKiczales actually points out that the many recent advancements on reasoning about programs (type systems, contracts) can probably be applied here.