On Thu, 21 Feb 2002 02:02, Stefan Bodewig wrote: > > What are the goals of defining and using roles? As far as I can see > > this is to allow extensibility, primarily the ability to define new > > nested elements for a task without changing the task. > > In the very first place, I'm with Adam here, roles just reflect that > there will be more pluggable things than just tasks and data types in > later version of the descriptor. A way to define shortcuts,
+1 to that > and to > avoid hard coded names in the parser. Can you explain? > > To give an example using real Ant types. > > <foo> > > <fileset ant:type="zipfileset"> > > The example could be > > <role name="fileset" class="org.apache.ant.types.FileSet" /> > <fileset name="zipfileset" class="org.apache.ant.types.ZipFileSet" /> > > in the descriptor and > > <foo> > <zipfileset ...> > > where the task simply only had add(FileSet). > > Less typing for the build file writer 8-) and to me it seems to be as > explicit as it needs to be. +1 Much easier for the user. -- Cheers, Pete *---------------------------------------------------------* | Programming today is a race between software engineers | | striving to build bigger and better idiot-proof | | programs,and the universe trying to produce bigger and | | better idiots. So far, the universe is winning. | | - Richard Cook | *---------------------------------------------------------* -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
