On Mon, 9 Dec 2002 13:47, Noel J. Bergman wrote: > > Assume that we ignore syntactic sugar and access data via "well defined" > > entrys. So rather than > > ((FooContext)context).getFooDirectory() > > we use > > (File)context.get( "foo:directory" ); > > Those are not equivalent.
from a components point of view they are. One is syntactic sugar for the other. > In the former case, context IS-A FooContext. In > the latter case, context need only HAVE-A FooContext (perhaps). I am sure most people here are comfortable with the difference between these concepts. > > So this means code like the following is not really an approved approach. > > ((FooContext)context).getFooDirectory() > > ((BarContext)context).getBarDirectory() > > I would consider that to be a particularly poor approach, anyway, for the > above mentioned reasons. I don't think anyone would consider that a great approach. -- Cheers, Peter Donald *------------------------------------------------------* | "Nearly all men can stand adversity, but if you want | | to test a man's character, give him power." | | -Abraham Lincoln | *------------------------------------------------------* -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>