"Geir Magnusson Jr." <[EMAIL PROTECTED]> wrote:
> > Your wish seems ok, maybe with some polishing... (see embedded
> > comment ) but would move velocity into a *real* scripting area.
> > Your proposal would be understandable by programmers, but find
> > little understanding by template designers.
> 
> I think this is true.

Named parameters are easier to understand than position parameters.
My guess is that the largest non-programmer user group right now is html 
designers.
Html uses named parameters.

Also, I think would would be better done by adding this to #macro rather 
than creating #widget -- KISS


> + Does someone see the map use case and the explicit defaults hard
>    to understand/explain for template designers?

Having two call patterns with different syntax is always harder than one 
syntax and call pattern.

#widget( "foo":"alice" ) &  #mymacro( "alice" )

vs

#mymacro( { "foo":"alice" } ) &  #mymacro( "alice" )

vs

#mymacro ( "foo":"alice" ) &  #mymacro( "alice" )

The Velocity motto appears to be "keep the syntax as simple as possible", 
and adding named parameters to #macro works cleaner in this regard than the 
map syntax.


> + Is the explicit assignment of defaults to macro parameters desireable?

I have macros where this would be very desirable.


> + How will this play together with the mentioned macro overloading (with 
different parameter counts)?

My guess: If you have named parameters with defaults, you can get by without 
macro overloading and variable argument counts.   
It will depend what creative uses people have come up with for macros.

-Mike

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

Reply via email to