ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: suggestion : Ant 1.8 full dist to include a 'scripting lang'
Date Mon, 18 Sep 2006 04:36:37 GMT
On Fri, 15 Sep 2006, Jesse Glick <jesse.glick@sun.com> wrote:

> -0.5 on Lisp or Scheme.

I don't think anybody around here was more than half-serious.

> Don't get me wrong, I probably would have been miserable as a
> teenager were it not for CLtLR2.

?

> Now <copy> can take a fileset, but you have a path, not a fileset,
> and there is no root.

You certainly know that 1.7 can copy paths just as well.

> for (jar in classpath.split(':;')) {
>   copy({file: jar, todir: destdir})
> }

demonstrates my biggest problem with using a scripting language
instead of something abstracted away from scripting (like our current
XML format).  You start to use the scripting language where you don't
need it.

We've not only built file up-to-dateness checks into most task, we've
also made most tasks perform those loops implicitly.

for (src in srcDir.scanRecursively()) {
    if (src.endsWith(".java")) {
        javac({src: src, todir: destDir});
    }
}

would be horribly inefficient, and probably be what many people new to
ant would use.  And I don't really think the above is more readable
than 

<javac srcdir="${srcDir}" destDir="${destDir}"/>

> which anyone can read and understand at once.

I'm not sure.  Any user with at least a little programming background
can, but Ant is used by people who don't have such a background at
all.  By hiding away as much of the procedural code as possible (OK,
we might be able to do even more) we've attracted a brader set of
users.

> If targets were replaced by functions, and <import> by load(...),
> you could compose scripts as normal library files, without having to
> sweat over idiosyncratic inheritance and naming rules in the Ant
> manual, not to mention the confusing ways that properties and
> references are passed to subscripts, which does not match the
> semantics of any real language.

We've defined a new language with Ant without noticing what we did.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message