Stefan Bodewig wrote:
> On 2009-08-15, Blaine Simpson <blaine.simp...@admc.com> wrote:
>
>   
>> Any chance that if I submitted a patch for "if" and "unless" attribute
>> support for the <arg> sub-element, that it would make it into Ant
>> distributions within a couple years?
>>     
>
> 8-)
>
> I wouldn't hold my breath.
>
> <https://issues.apache.org/bugzilla/show_bug.cgi?id=42447> would be the
> place to attach the patch, I guess.
>
> Given that you say you have to create conditional targets over and over
> again and I have not encountered a situation where I had needed a
> conditional arg (we seem to be Ant users for about the same time) - in
> what situation do you need these kinds of conditional <arg> elements?
>
> Stefan
>   
Maybe you live in an IDE world.  I spend much of my life working with
command-line programs, Java and non-Java.  Optional switches and
command-line parameters have been a common programing feature since I
started programming many, many years ago.  Surely you know about the
variable length "argv" and the ubiquitous implementation of -switches
and /switches.  For UNIX command-line programs which operate on files,
there is a 30 year old convention to take any number of optional file paths.

Optional switches usually do not have a negative counterpart.  I.e. to
change the default operation of a feature, say for ffmpeg or rsync or
tar you use a - switch or "-" switch + following param.  In general you
can not enable default operation with another switch or param, and none
of these programs takes "-", "", " ".  For UNIX file-processing
programs, 99% will operate on stdin if NO filepath parameters are
specified.  [One special case which does not require extra Ant work is
for programs where I can always give at least one switch, and all
desired switches are of the single-character variety and can be merged
into a single param like the "-cm" of "wc -cm file/path", though it
would be much cleaner from Ant if I could specify individual Ant args
for exacly what is needed, corresponding to "wc -c -m...".]

My associates and I write tons of Java programs that take optional
parameters.  A couple very recent cases of optional params are lists of
3D objects to load into a scene upon startup (extremely useful from Ant
so that a developer can do coding to support  a specific type of 3D
object and run a target to build that code and execute the 3D program so
that it exercises that object type); a "-r" switch to Reset the
configuration upon startup; a switch to specify whether to use Java2D
Pipelining (critical to have on for some cases, and fatal to have on in
others).  These are all cases which require lots of extra Ant file
coding to support 40 year old argv functionality.

Only answering here to satisfy your curiosity.  I don't have time to
submit patches which will never see the light of day.

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

Reply via email to