On Fri, Apr 13, 2012 at 09:45:52PM +1000, Tim Starling wrote:
Does anyone have any thoughts on return versus print generally?
If you do go with the print solution, someone will eventually request something along the lines of PHP's output buffering functions[1] so they don't have to rewrite function A to use return instead of print when function B needs to somehow postprocess A's output. I'd guess that just ob_start() with no arguments, ob_get_clean(), and maybe ob_end_flush() would probably serve the majority.
And then they will probably use it for efficient string concatenation, if standard Lua string concatenation is really that inefficient.