On 18 Dec 2004, at 16:25, Matt Sgarlata wrote:

<snip>

robert burrell donkin wrote:
> does anyone think that there is any real need for implementations to
> belong to a second type hierarchy?

I don't think it's a good idea to *preclude* logs from participating in two different type hierarchies because it's hard to anticipate new use cases.

it's a tradeoff :)

it's hard to anticipate new use cases. this means that it's hard to future-proof any interface. Log isn't too bad but (had it been an abstract class) i think that it would have had at least one more method added (to improve support for IoC frameworks). it's important to keep in mind that these interfaces are likely to have to maintain compatibility for several years.

But to answer your question, remember how Richard proposed that the generation of exception messages be possible with Logs? Well I think the community struck that idea down, but what if someone *did* decide they wanted to combine that functionality with their logger. In that case they would probably want to extend some type of message resolution base class rather than being forced to extend a Log abstract class.

(i wasn't the first to note this but) inheritance is often overused in java. an equally good design could use delegation (to the message resolution class) or a nested implementation. i don't mind forcing users to choose a particular design provided that this design is as good or better than the original.


the only use case (where alternative, equitable designs do not exist) i can think of would be a Log proxy. i'm not sure how useful that would be.

- robert


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to