Talk:Blocks (C language extension): Difference between revisions

Content deleted Content added
Devnevyn (talk | contribs)
No edit summary
Cewbot (talk | contribs)
m Maintain {{WPBS}} and vital articles: 2 WikiProject templates. Create {{WPBS}}. Keep majority rating "Start" in {{WPBS}}. Remove 2 same ratings as {{WPBS}} in {{WikiProject Computer science}}, {{WikiProject Apple Inc.}}.
 
(13 intermediate revisions by 11 users not shown)
Line 1:
{{Talk header}}
{{WikiProject Computer science|class=|importance=Mid}}
{{WikiProject banner shell|class=Start|
{{WikiProject Computer science|class=|importance=Mid}}
{{WikiProject Apple Inc.|importance=Low}}
}}
 
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. --[[User:Devnevyn|Devnevyn]] ([[User talk:Devnevyn|talk]]) 08:38, 17 September 2009 (UTC)
 
 
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. --[[User:Devnevyn|Devnevyn]] ([[User talk:Devnevyn|talk]]) 08:52, 17 September 2009 (UTC)
 
I agree with both of these criticisms, I've removed the latter passage entirely and clarified the former. I've removed some non-sequiturs ("Blocks introduce a derived type into the language." Fabulous!) I also removed the misleading reference to C++ lambdas. C++ lambdas differ from blocks in far more than syntax. A comparison would be appropriate, but it must compare more than just the superficial. This article still needs a rewrite/expansion, but it's now more accurate and less misleading. -[[Special:Contributions/76.254.63.45|76.254.63.45]] ([[User talk:76.254.63.45|talk]]) 00:21, 25 October 2009 (UTC)
 
== Relation to GCC nested functions ==
 
The article should probably also describe the differences with GCC's Nested functions:
http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Nested-Functions.html#Nested-Functions
I went to look it up, thinking that they were the same, but then realized that nested functions, unlike closures, cannot be called after the containing scope has exited.
 
--[[User:Blaisorblade|Blaisorblade]] ([[User talk:Blaisorblade|talk]]) 10:40, 26 April 2010 (UTC)
 
:I've integrated your text above into the article. Thanks! -- [[User:The Anome|The Anome]] ([[User talk:The Anome|talk]]) 11:12, 26 April 2010 (UTC)
 
: 3 years later, I have to say this part adds nothing to the article. If you never thought that these concepts were the same then it is confusing why the nested functions are being brought up. I am not sure why one person's previous flawed understanding means everyone has to see it in the article. - [[Special:Contributions/70.36.139.84|70.36.139.84]] ([[User talk:70.36.139.84|talk]]) 13:38, 11 July 2013 (UTC)
 
== Relation to C++ Lambda functions in GCC and other mainstream compilers ==
 
Looks like the mainstream of compilers for C/C++ are about to make "Blocks" or "Lambda" functions part of the 4.5 of the GCC compiler.
 
http://stackoverflow.com/questions/349899/what-c-compilers-are-supporting-lambda-already
 
Lambda is part of the C++0x (C++ language definition update)
http://en.wikipedia.org/wiki/C%2B%2B0x
 
== External links modified ==
 
Hello fellow Wikipedians,
 
I have just modified one external link on [[Blocks (C language extension)]]. Please take a moment to review [https://en.wikipedia.org/w/index.php?diff=prev&oldid=791704517 my edit]. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit [[User:Cyberpower678/FaQs#InternetArchiveBot|this simple FaQ]] for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20090920043909/http://images.apple.com/macosx/technology/docs/GrandCentral_TB_brief_20090903.pdf to http://images.apple.com/macosx/technology/docs/GrandCentral_TB_brief_20090903.pdf
 
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
 
{{sourcecheck|checked=false|needhelp=}}
 
Cheers.—[[User:InternetArchiveBot|'''<span style="color:darkgrey;font-family:monospace">InternetArchiveBot</span>''']] <span style="color:green;font-family:Rockwell">([[User talk:InternetArchiveBot|Report bug]])</span> 23:43, 21 July 2017 (UTC)
 
== Mention possible inclusion in C2x? ==
 
The standards committee has mentioned bringing in blocks to the next official version of C (tentatively scheduled for early 202x) -- would that be appropriate the bring up in the page or is it too speculative? <!-- Template:Unsigned IP --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/23.241.197.166|23.241.197.166]] ([[User talk:23.241.197.166#top|talk]]) 07:30, 26 November 2017 (UTC)</small> <!--Autosigned by SineBot-->