ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Vaughn <rvau...@seaconinc.com>
Subject Re: Why Properties became immutable
Date Tue, 25 Jul 2000 13:43:00 GMT
rubys@us.ibm.com wrote:

> For exactly people like you, I added a scripting task.  Here's an example I
> posted previously as a demonstration of the virtually limitless power of
> such a construct:
>
>    <project name="squares" default="main" basedir=".">
>
>      <target name="setup">
>
>        <script language="javascript"> <![CDATA[
>
>          for (i=1; i<=10; i++) {
>            echo = squares.createTask("echo");
>            main.addTask(echo);
>            echo.setMessage(i*i);
>          }
>
>        ]]> </script>
>
>      </target>
>
>      <target name="main" depends="setup" />
>
>    </project>
>
> The point of this exercise is that I firmly believe that Ant should not
> create yet another procedural language, but allow you to use whatever
> language you already prefer.  Local variables, loops, affecting the overall
> flow of execution the build - all these things are possible.
>
> - Sam Ruby

Sam,

Thanks, I saw that reply coming.  :-)  I can actually accomplish most things
similarly with XSLT now (ahem, *declaratively* ;-) ), but this approach has
quite a bit of power, too.

I don't want to see Ant become a procedural language, either.  My whole point -
lest I be misunderstood here - is only that I ALSO get scared hearing things
like "declarative at all costs!"

roger



Mime
View raw message