Content deleted Content added
Added comment to the "First Example (Python)" section |
m Dating comment by Smerdis - "Added comment to the "First Example (Python)" section" |
||
Line 778:
::I agree that the lambda code is too mysterious to be helpful here, and the example you just restored is better. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 01:59, 12 February 2012 (UTC)
: I find the [https://en.wikipedia.org/w/index.php?title=Closure_(computer_programming)&oldid=595411369#Example | current example] misleading since the closure returned by <code>counter</code> is an impure function, printing different values for calls on the same argument. The fact that the state captured in a closure can be mutable is important, and should be mentioned somewhere in the article, but presenting this as a canonical example is likely to mislead readers into thinking that closures are by nature impure (misleading since purely functional languages like Haskell of course allow closures as well). —[[User:Smerdis|Smerdis]] 27 February 2014 <span style="font-size: smaller;" class="autosigned"> — Preceding [[Wikipedia:Signatures|undated]] comment added 20:26, 27 February 2014 (UTC)</span><!--Template:Undated--> <!--Autosigned by SineBot-->
|