Skip to main content
4 events
when toggle format what by license comment
Jan 10, 2018 at 14:18 comment added jesm00 I agree with both points, I was just trying to give a simple example to illustrate the other case (though it's a bad example as you both pointed out :)).
Jan 10, 2018 at 14:14 comment added Daniel Pryden I agree with Nic, and would add: If you want to ensure begins and ends are always coupled, you should also provide language-specific idioms for that: RAII/scope guards in C++, using blocks in C#, with statement context managers in Python, passing the body of as a lambda or callable object (e.g. Ruby block syntax), etc.
Jan 10, 2018 at 14:01 comment added anon As a side note, if it's something like the pseudo-block (one statement at the beginning, one at the end), you should probably use begin and end or synonyms, just to make it explicitly clear that's what they do, and to imply that a beginning has to have an ending and vice versa.
Jan 10, 2018 at 13:15 history answered jesm00 CC BY-SA 3.0