in reply to Templating algorithm - pass in variables vs callback?

This similar to the way Ruby does many things; not specifically code refs of course, but any method invocation can provide an associated block of code. The method in question can call back into this block using yield, passing it parameters and receiving the return value the block produces. Some methods behave differently depending on the presence/absence of a block. I've heard anecdotal tales of many Perl people toying with Ruby starting to use similar techniques (with coderefs, of course) in their Perl.

So no, it's not that far out.

  • Comment on Re: Templating algorithm - pass in variables vs callback?