Jump to content

Talk:Blocks (C language extension)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Devnevyn (talk | contribs) at 08:52, 17 September 2009. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconComputer science Unassessed Mid‑importance
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
???This article has not yet received a rating on Wikipedia's content assessment scale.
MidThis article has been rated as Mid-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

This page should not mention Grand Central Dispatch more than mentioning that it optionally uses blocks. The many GCD references only serve to further confuse the two. --Devnevyn (talk) 08:38, 17 September 2009 (UTC)[reply]


Also, what does this mean?

Unlike closures in pure functional languages, blocks do not capture all of their surrounding state; 
they only capture copies of their surrounding stack variables.[5]

What state is NOT captured? Globals are captured by reference, and all locals are captured also by reference in a stack block, by copy for a non-__block variable in a heap block, and by owning reference in a __block variable in a heap block. Unless I'm missing something, the statement is wrong, so please elaborate. --Devnevyn (talk) 08:52, 17 September 2009 (UTC)[reply]