Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    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. Commented Jan 10, 2018 at 14:01
  • 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. Commented Jan 10, 2018 at 14:14
  • 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 :)). Commented Jan 10, 2018 at 14:18