Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 97614 invoked from network); 27 Nov 2002 11:44:56 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 27 Nov 2002 11:44:56 -0000 Received: (qmail 16226 invoked by uid 97); 27 Nov 2002 11:45:53 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 16210 invoked by uid 97); 27 Nov 2002 11:45:53 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 16198 invoked by uid 98); 27 Nov 2002 11:45:52 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <3DE4B0D3.6010800@cortexebusiness.com.au> Date: Wed, 27 Nov 2002 22:47:31 +1100 From: Conor MacNeill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: en-us, en-au MIME-Version: 1.0 To: Ant Developers List Subject: Re: [PATCH] Adding Dynamic elements for the n'th time References: <000e01c2958e$05607f60$270610ac@manu.com> <3DE3ED6A.4000209@ehatchersolutions.com> <3DE498D3.2040107@cortexebusiness.com.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Stefan Bodewig wrote: > > I agree (that we should agree 8-). Could you define what you mean > when you say "polymorphic behaviour"? IIRC it has been a bit > different from the notion other people on this list had. > :-). Maybe only the notation. Good point, however. My definition of polymorphism in Ant is that I should be able to extend a type and pass that new type to the task in place of the original. I think fileset and zipfileset are somewhat of an example (zipfileset may not obey Liskov, can't remember). Classfileset is another. When I committed classfileset, I could not upgrade all tasks, especially those outside Ant, to accept it in place of a standard fileset. The current approach is not that nice (defining a type instance with id and then refid'ing it at point of use). So, this we should agree on as a desirable goal. What comes next is the notation to express the use of derived type, and the underlying implementation in the core. In Mutant I advocated an explicit statement of the substitution and later found that this approach is also used in XML-Schema (I know not everyone likes this). My original Ant 1 patch (which Magesh has cited) used a different approach where it tried to guess which underlying method is to be used. I haven't studied Magesh's patch in detail but for fully flexibly polymorphism, you need to identify the type of the object being passed and the method on the task to which you will pass it (i.e. two independent things). Using only one piece of information (the type name) has limits. Conor -- To unsubscribe, e-mail: For additional commands, e-mail: