Implementing a DSL using groovy.util.DelegatingScript

2016-08-16 Thread Gerrit Telkamp
I'm using groovy.util.DelegatingScript to realize a simple DSL. It works quite well and the implementation was straight forward. Now I would like to extend my DSL by more words. Usually, this would be done by implementing each word as method in the delegate class. Instead I would like to split t

Re: Iterate ArrayList over XML Groovy

2016-08-16 Thread GroovyBeginner
Hi Paulk, Is there any alternative approach of doing this without XmlUtil.serialize since am facing few jar issues. -- View this message in context: http://groovy.329449.n5.nabble.com/Iterate-ArrayList-over-XML-Groovy-tp5734628p5734680.html Sent from the Groovy Dev mailing list archive at Nabbl

Re: Implementing a DSL using groovy.util.DelegatingScript

2016-08-16 Thread Jochen Theodorou
On 16.08.2016 10:45, Gerrit Telkamp wrote: I'm using groovy.util.DelegatingScript to realize a simple DSL. It works quite well and the implementation was straight forward. Now I would like to extend my DSL by more words. Usually, this would be done by implementing each word as method in the del

Re: Implementing a DSL using groovy.util.DelegatingScript

2016-08-16 Thread Gerrit Telkamp
Jochen, thank you for your approach! It seems that question was a bit incomplete. I should have asked: Is it planned to include a list of Delegate Classes by groovy itself, or is the preferred way to "roll your own" on application level by the existing groovy.util.DelegatingScript? BTW, the "Mis

Re: [CONTRIBUTION]groovy-option-support

2016-08-16 Thread Jochen Theodorou
On 12.08.2016 17:39, daniel_sun wrote: Hi all, The option pattern(http://www.codecommit.com/blog/scala/the-option-pattern) is very useful to improve the robustness of program by avoiding NPE. Scala and Rust have build in the pattern(http://www.tutorialspoint.com/scala/scala_options.htm

Re: [CONTRIBUTION]groovy-option-support

2016-08-16 Thread daniel_sun
Hi Jochen, Thanks for your reviewing the codes. I think you are right about the difference between Java8's Optional and the proposed Option. As Java8 has supported option pattern and Groovy will migrate to Java8, there is no need to integrate the library and DGM will be better :) B