> From: Daniel Rall [mailto:[EMAIL PROTECTED]]
>
>
> Jon Stevens <[EMAIL PROTECTED]> writes:
>
> > on 12/5/2000 8:14 PM, "Geir Magnusson Jr."
> <[EMAIL PROTECTED]> wrote:
> >
> > > Again, I think these are useful, but I am not 100%
> convinced we want to
> > > do this right now. (But the geek in me does :)
> > >
> > > geir
> >
> > My gut feeling is a -1 on #macro's having scope.
> >
> > The fact that I made Anakia work is seriously pushing the
> overall design
> > scope of Velocity IMHO.
> >
> > If you start adding things like scope, then you are going
> to complicate
> > things for designers. I'm against doing anything like that.
>
> I am not in favor of adding scope to #macro's. Leave them as simple
> global symbols.
>
I agree that Geir proposal is a little complicated even for me :-)
But what I am asking is for something way more simple.
Being able to associate macros with the Template in which they are defined.
So except for macros in the global libraries if you define macros in your
template, they belong to your template and you cannot use it in another.
This behavior could be controled by a runtime property, if you want.
My point is that in any large shop, you will have people using the same
name for unrelated macros. "#formatAccount". If they happen to run
on the same JVM (or classloader) -- Velocity is not just for Turbine and
Tomcat -- this people will get into conflicts and no one will know what
is going on.
In any case, what are the rules when Templates are reloaded?
Do I override the macro definition? What if that definition came from
another template. Are we keeping track of all that? (I really do not know).
Does it make sense for me to use a macro on one template that I did not
define, and is not in the global library, but that is defined in some other
template that I may not even be sure it has been loaded.
After all, if it is a library I should put it in the global place
or I can loaded on each template using #parse of the template containing it.
Does anyone see the problems I see with the current arrangement?
Jose Alberto