"Geir Magnusson Jr." wrote:
> Christoph Reck :
>[snip]
> > Some of you have strong feelings against allowing the ASTSetDirective
> > checking for a put method (ASTIdentifyer already has th notion of the
> > get method!). Anyone in favour of adding the put notion to
> ASTSetDirective?
> 
> I am coming around, actually, but not there yet.  :) The Identifier has to
> do it because of our introspection rules.

Does this mean that my long wanted #set( $hastable.KEY = "woobie" )
will come soon?

Or since jon replied to:
> > I would also vote in favour of a #set( $foo = {} ) usable to create
> > a Map that can be populated via #set( $foo.KEY1 = "xyz" )... but this
> > seems to be another issue :)
> 
> Strongly -1. You have things like potential synchronization issues and
> exceptions to worry about. Two things that VTL has no concept of.

A) Does this definitevly kill this proposal/request? 
B) Or does this -1 apply only to the #set($foo = {})? 

I read it as A), where the reason is the synchronization issue (on the
Map within the context).

Then I would have to modify my WM code when porting to Vel to 
  #set( $dummy = $hastable.put("KEY", "woobie") )
Note that an automatic conversion will then not be possible.
I also would like to avoid the ugly $dummy, but it can be
avoided with a global #call macro: 
  #macro( call $foo )#set( $dummy = $!foo )#end
  #call( $hastable.put("KEY", "woobie") )
I guess this will evaluate the parameter passed to $foo once and
the bang will avoid any log messages if the evaluation returns NULL
(is this correct? is the bang sensible here? does "$!foo" need to 
be quoted - it will call the toString unnecessarily?).

:) Christoph

Reply via email to