Christopher Smith wrote:
You may now commence griping about how C++ sucks, is overly complex, and these changes only make it worse.

Are these really closures? I don't see in any of the examples unbound variables. Not that you couldn't do it with proper compiler support, but the examples shown certainly aren't showing off (say) storing a closure in a global, returning from the function that created it, then accessing the local variables from the function that created the closure.

Note that later versions of C# handle this by basically making an anonymous class and copying the local variables into it, letting you nest closures and functions while returning them from the creating function. So maybe C++ does this. But it certainly isn't obvious from this article.

--
  Darren New / San Diego, CA, USA (PST)
    "That's pretty. Where's that?"
         "It's the Age of Channelwood."
    "We should go there on vacation some time."

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to