From: Francis Hwang Date: 2004-11-12T03:14:58+09:00 Subject: Re: Thinking About Java Interfaces In Ruby On Nov 11, 2004, at 1:07 PM, Jamis Buck wrote: > The *only* time I've thought interfaces would be nice is when I > considered finding a way to implement type 1 inversion of control. > This is where a service just says "I need another service that > implements this interface" and the container goes and finds one that > matches. > > Even then, I was only thinking it would be neat to implement for the > "gee-whiz" value, not because I actually needed that feature. If you want to be really far out, you can write code that infers this, by looking to see if various methods are defined. I've done this in extremely simple cases, and I wonder if there's a use for the idea in broader contexts, but that sort of feels like PhD stuff. F.