Talk:Closure (computer programming): Difference between revisions

Content deleted Content added
Ruud Koot (talk | contribs)
S.POROY (talk | contribs)
Line 809:
 
{{ping|Maggyero}} I'm not sure if I completely agree with [https://en.wikipedia.org/w/index.php?title=Closure_%28computer_programming%29&type=revision&diff=729749204&oldid=723316111 these] changes to the lead section. These changes allow for the possibility of a closure capturing variables by value instead of by reference. If feel this distinction is overly pedantic for the lead section, and makes it even harder to understand. Especially considering that the distinction only makes sense at all in imperative languages/language where variables are mutable, and even more so since C++ is the only language I'm aware of that allows capturing by value. Instead I'd suggest assuming immutable variables/capture-by-reference semantics in the lead and go into more detail on capture-by-value in a footnote and/or separate section on closures in imperative languages. —''[[User:Ruud Koot|Ruud]]'' 15:08, 14 July 2016 (UTC)
 
== Small typos or not? ==
 
Hi, these two seemed to me as typos but I'm not sure, and this is my first attempt to contribute to wp.. In '''Delegates (C#, D)''' section, the sentence "For example, the above code will not work correctly, because the variable a is on the stack, and after returning from test(),..." it is not clear to which function test() refers, test1(), test2() or both? And in the last sentence "The same is true for inner's class methods that..." should it be "inner" instead of "inner's class methods" or am I missing something? --[[User:S.POROY|S.POROY]] ([[User talk:S.POROY|talk]]) 19:45, 15 May 2017 (UTC)