
On 11/19/2011 6:08 PM, Lorenzo Caminiti wrote:
On Fri, Nov 18, 2011 at 11:23 PM, Joel de Guzman
Why can't we C++ programmers just accept the fact that we don't have *true* local functions like those in Pascal and Modula?
Because now we have Boost.Local so we can program true local functions with all their functionality :) (If not, which local function functionality is missing from Boost.Local?)
It's very different. See, for example: function E(x: real): real; function F(y: real): real; begin F := x + y end; begin E := F(3) end; There's no need to "bind" x. F can see x. That's the feature I want to see in a local function that *cannot* be done in any way in C++. *True* local functions should not require you to bind a local variable to make it visible in a nested function. Regards, -- Joel de Guzman http://www.boostpro.com http://boost-spirit.com