On Thu, 23 Oct 2003, peter reilly <[EMAIL PROTECTED]> wrote:
> One example would be the way lisp does things.
>
> (let ((here (point))
> (ignore-depth 0)
> (tag-info context))
> bla.. bla..
> )
At least Emacs Lisp uses dynamic extent here, i.e. with
(setq here bar)
(let ((here foo))
(some-method))
the function some-method would see the value foo for 'here.
I'm not familiar enough with other Lisp dialects. So if you want to
draw this parallel, <ant> would have to inherit the local shadows.
And <macrodef> would see the same problems (defmacro) has and we'd
have to introduce "uninterned symbols" to solve some issues,
(i.e. properties that are no properties at all). In a sense,
<macrodef>'s current attributes are such uninterned symbols.
Incidentally I was reminded of (let) myself when I looked at the
<local> container.
> <let>
> <local name="here" value="point"/>
> <local name="ignore-depth value="0"/>
> <local name="tag-info" value="context"/>
> <echo>here is ${here}</echo>
> </let>
>
> But this is not much different from:
> <sequential>
> <local name="here" value="point"/>
> <local name="ignore-depth value="0"/>
> <local name="tag-info" value="context"/>
> <echo>here is ${here}</echo>
> </sequential>
Except that <sequential> has never provided any sort of scoping at
all, neither has <target>. Making it explicit may help people to
understand the concept.
> This is done to support the following:
> <local name="x"/>
> <parallel>
> <sequential>
> <property name="x" value="1"/>
> <echo>x is ${x}</echo>
> </sequential>
> <sequential>
> <property name="x" value="2"/>
> <echo>x is ${x}</echo>
> </sequential>
> <sequential>
> <property name="x" value="3"/>
> <echo>x is ${x}</echo>
> </sequential>
> </parallel>
Feels wrong. Each sequential should be/contain a <local> IMHO. If
you want to have different local scopes withon the <sequential>s then
you have to create them.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]