I second this, being able to return a value or tuple of values from included template would allow to share pieces of code among template. That'd reduce ammount of code duplication and easy maintenance.
Anybody ready to hax eZ Publish and add this feature? Or is it already included, just not well documented well enough?
You can store the result of a template using the {set-block} statements : http://ez.no/doc/ez_publish/technical_manual/3_6/reference/template_functions/variables/set_block.
Note that only HTML will be stored in the newly created variable. Because of this, having a template working as an operator isnt possible. The best reason for that is that this is not what templating is meant for.