Boost logo

Boost :

Subject: Re: [boost] [local] Review
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-11-19 06:09:41

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;
      F := x + y

    E := F(3)

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.


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at