Timeline for Using compound statements ("{" ... "}" blocks) to enforce variable locality
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Nov 10, 2015 at 21:15 | history | suggested | Deduplicator | CC BY-SA 3.0 |
trivial fix to example code, enabled syntax-highlighting
|
Nov 10, 2015 at 20:50 | review | Suggested edits | |||
S Nov 10, 2015 at 21:15 | |||||
Nov 10, 2015 at 17:25 | comment | added | Matthieu M. | @Warbo: I imagine it exists in many languages (as long as they have anonymous functions), I picked C++ both because I am familiar with and because the recommendation came from the chair of the C++ Standard for... some 10 years I think? So that it's hard to be more authoritative. | |
Nov 10, 2015 at 16:43 | comment | added | Warbo |
I came here to mention let expressions, and you beat me to it ;) In my opinion, that's exactly what "naked compound statement" is :) Your C++ example is also very widespread in the Javascript world.
|
|
Nov 10, 2015 at 15:42 | history | answered | Matthieu M. | CC BY-SA 3.0 |