ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [DISC] core extensions
Date Mon, 02 Apr 2001 09:34:04 GMT
At 11:26  2/4/01 +0200, Stefan Bodewig wrote:
>Just for the record, as I seem to come through as "anti-interface"
>because I argue against making all data-types interfaces and making
>Task an interface: This is not true, I like to use interfaces, but not
>everywhere, just because we can. 

I agree - and as yet I have yet to see a good reason for data items being
an interface (or tasks for that matter).

>There are places where interfaces are not appropriate IMHO. One
>situation is where the contract between a Task and the core (or
>TaskEngine) is more than just "Tasks have to adhere to a given
>interface", but this contract also involves some rules about how to
>implement that interface.

Not really .. look at servlet API. There are rules that *should* be
adheared to and 99% of the time are - which is why 99% of servlets extend
GenericServlet or more likely HttpServlet. If use the same model in Ant2
(ie Task interface + AbstractTask class) then we gain significant
advantages IMHO and it is easy for users.

>> However the main reason for separation between
>> interface/implementation is to force us developers to design things
>> well. It is much harder to justify adding onto an interface on a
>> whim than it is to add an extra method to a class ;)
>Sure? 8-)

Well it makes it easier for me to spot it and get grumpy about it ;)



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message