i don'have a real question about these code, i would know what think about the same but i think this forum isn't the correct place!
-> IF I MUST I DELETE THIS TOPIC!
Anywhere the code formatted is located after and show the use of Groovy Closure to apply a new language model pattern, the example declare a closure that call recursivly n closure passed them and i use this to execute n Closure properly:
You've prompted me to publish a blog post that I hope doesn't become a Pandora's box. I think you might enjoy it, as it does something similar but slightly more complex than what you're proposing.
I think calling this chaining of closures a "pattern" is rather dangerous, particularly because a pattern is supposed to solve a specific problem in a given context. In your example, there was really no problem with writing your code normally without the chaining of closures. Switching to using the closures, one after the other only complicated the code with no perceivable advantage.
However, I do think this is a fun concept to play with and I wouldn't doubt if there are plenty of places in the world where something like this potential "pattern" would really solve something, such as in a workflow engine.
A good workman is known by his tools.
pino astarita
Greenhorn
Joined: Nov 14, 2006
Posts: 13
posted
0
Hi Marc,
the propose to use the word 'pattern' correctly can be ambiguos but i would refer to the question about to tempt to solve the problem of readiblity of a software for this i've used the word 'pattern'.
Chaining different work together in the way i've described help to sintetize a worflow ,better, more unit of work related, in a better way.
Aniway would be an experimental code only this but i thing that i've proposed it incorrect way.
Aniway, Thanks for you attention! ;-) by!
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Example of using Groovy Closure for a different programming style