> From: Jack J. Woehr [mailto:[EMAIL PROTECTED] 
> 
> Jose Alberto Fernandez wrote:
> 
> > The way I see it, a macrodef <let> will also solve the issue of 
> > concurrency. Notice that in all this cases the issue is how do you 
> > refer to the value just generated. Lets assume you have the macro I 
> > defined before:
> >
> > <macrodef name="example">
> >   <attribute name="foo"/>
> >   <let name="basefoo"/>
> >   <sequential>
> >     <basename property="@{basefoo}" file="@{foo}"/>
> >     <echo massage="[EMAIL PROTECTED]"/>
> >   </sequential>
> > </macrodef>
> 
> Of course what this is really all about is the design 
> decision for rigid declarative syntax in which there is no 
> such thing as a function which returns a string into a 
> scalar. In effect, you with your local properties and I with 
> my recursive parsing are struggling to retrofit functional 
> programming into Ant without spooking the ideologues :-)

As the chief ideologue of the declarative camp that puts me in the spot
:-)

Lets not forget that real functional languages ARE declarative. 
I.e.: variable names represent a value at the point they were defined
and you cannot change that value.

What ALL proper declarative languages have that ANT does not is
the concept of local variable (functional let X; prolog's X; lisp's
lambda x) 
whose scope is just the local context in which they are mentioned.

Now that we can write recursion (the basic means of computation in any 
declarative language) we see the need for such a thing.

But it is not an easy change for ANT because the tasks that manipulate
properties assume they are global. My attempt was to comply with their
assumption and provide them with a global name for them to use.

It is probably not the best solution, but I really fear about the impack
of some of the other proposals on the assumptions that ours and third
party tasks make of how things work.

My macrodef.let tries to provide a syntax for such a local variable
name.

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to