
Thomas Heller-7 wrote
On 01/02/2012 10:25 AM, Lorenzo Caminiti wrote:
Hello all,
Boost.Closure (formerly, Boost.Local) needs to use some macros, types, etc that are currently marked private in Boost.ScopeExit:
Boost.Closure?
My library implements closures as defined by http://en.wikipedia.org/wiki/Closure_(computer_science) (as discussed in this link for C++ and as with C++11 lambdas, C++ closures should not bind by reference when they are used outside their declaration scope): ``In computer science, a closure (also lexical closure, function closure, function value or functional value) is a function together with a referencing environment for the non-local variables of that function.[1] A closure allows a function to access variables outside its typical scope. Such a function is said to be "closed over" its free variables. The referencing environment binds the nonlocal names to the corresponding variables in scope at the time the closure is created, additionally extending their lifetime to at least as long as the lifetime of the closure itself. When the closure is entered at a later time, possibly from a different scope, the function is executed with its non-local variables referring to the ones captured by the closure.''
I really don't like that name is at implies functional programming capabilities.
For example, I programmed all the examples from the link above using my library. Is there an example of what you'd expect to do with a C++ closure that cannot instead be programmed with my library?
Didn't you decide to name it Boost.LocalFunction instead?
I'm equally happy with LocalFunciton or Closure. My review manager and one of the reviewers expressed a strong preference for Closure because a shorter name and more to the point of the library purpose so I'm adopting that name. --Lorenzo -- View this message in context: http://boost.2283326.n4.nabble.com/protected-APIs-tp4252824p4261817.html Sent from the Boost - Dev mailing list archive at Nabble.com.