From dev-return-65964-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Fri Apr 15 19:19:44 2005 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 75341 invoked from network); 15 Apr 2005 19:19:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Apr 2005 19:19:44 -0000 Received: (qmail 57982 invoked by uid 500); 15 Apr 2005 19:19:39 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 57893 invoked by uid 500); 15 Apr 2005 19:19:38 -0000 Mailing-List: contact dev-help@ant.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 dev@ant.apache.org Received: (qmail 57846 invoked by uid 99); 15 Apr 2005 19:19:38 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from junior.lgc.com (HELO junior.lgc.com) (134.132.72.99) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 15 Apr 2005 12:19:36 -0700 Received: from lgchvw01.landmark.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.7/8.11.3) with SMTP id j3FJJbu12092 for ; Fri, 15 Apr 2005 14:19:37 -0500 (CDT) Received: from 134.132.72.99 by lgchvw01.landmark.lgc.com (InterScan E-Mail VirusWall NT); Fri, 15 Apr 2005 14:19:29 -0500 Received: from HOUEXCH903.landmark.lgc.com (houexch903 [134.132.167.43]) by junior.lgc.com (8.11.7/8.11.3) with ESMTP id j3FJJVN12077 for ; Fri, 15 Apr 2005 14:19:31 -0500 (CDT) Received: from HOUEXCH902.landmark.lgc.com ([134.132.167.38]) by HOUEXCH903.landmark.lgc.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 15 Apr 2005 14:19:23 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Ant "roles" Date: Fri, 15 Apr 2005 14:19:23 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Ant "roles" Thread-Index: AcVB6nHYG+MA/1/vS/KkqQzjNB1RkAAAujnQ From: "Dominique Devienne" To: "Ant Developers List" X-OriginalArrivalTime: 15 Apr 2005 19:19:23.0532 (UTC) FILETIME=[08311CC0:01C541F0] X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > From: Peter Reilly [mailto:peterreilly@apache.org] > I have not been able to respond as my work commitments > are extreme at the moment. >=20 > I do not like roles (although I did write an implementation) > as it would be like the following in a language: >=20 > Integer x =3D 1; > Complex x =3D (8, 10); >=20 > Complex z =3D (-1, 9); >=20 > Complex y =3D x + z; >=20 > The compiler in this case knows which "x" to pick > based on the context. I think that's the wrong analogy Peter. It's not so much that Ant would pick the correct instance to use, but more to pick the correct class of instances. I did write about binding several different impls/roles under the same name with auto-selection based on context, but it may indeed not be a good idea. The correct analogy in my mind is trying to use two similarly (short) named classes, from different packages. In which case you must disambiguate them with the package name (at least one of them in Java can be imported, the rest need full qualification). > I do not know any language like that (I am sure that > there are a few!) but I feel it would be confusing to > users. For the simple case of getting the correct "and", it > may not be too bad, but the feature could be misused and > people could wind up with impossible to debug build > scripts. >=20 > I do not using XML namespaces to denote ant core types. > Traditionlly ant build files have been free of namespaces (until > ant 1.6 they were not possible). I guess that's were there's a communication breakdown. All I'm saying is that an antlib per-role allows use of the add(Type) methods, especially in 3rd party antlibs. Ant barely uses these methods. We just need a way to unambiguously specify which role impl to use. AntLibs, which can be declared and use thru XML namespaces (but don't need to!) are a natural choice. Roles are not Ant types. They shouldn't be. They're little strategy classes for somebody else to use, not full fledge tasks/types. > It has been IMO a reason for > ant's success (see the demise of jelly). The build files are > easy-to-read - and free of clutter. The demise of Jelly has probably more to do with the fact that it was a real programming language with an Ugly XML syntax. Ant has kept mostly declarative, and thus does not suffer the same ills. > Using XML namespaces > are fine for using a small number of external antlibs - One doesn't need to use XML namespaces to use AntLibs > I would have preferred a simple prefixing mechanism (water > under the bridge now). It was becoming obvious to me you had second thoughts... I do not share your doubts obviously (maybe it's my use of XSL), but nothing prevents you from adding a prefix attribute to taskdef/typedef (isn't there one already?). Finally, I'd like to remind everyone that what I was asking all along, and still propose, is simply to have a few XML resource files added to Ant. There are absolutely *zero* Ant source code changes necessary!!! Except if as Matt proposes we offer a shortcut to accessing these XML resources. So can we please have at least these resources? I'd even do it if we can get some sort of agreement here, or more precisely if we don't get any -1. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org