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.

Required fields*

5
  • 3
    At least in this example, I'd call it "pointlessly worrying about micro-optimisations". Commented Sep 23, 2020 at 10:36
  • 3
    This is not an error. At all. There is literally no problem here. The worst thing you can worry about is that it's slightly less optimized than possible. But that's not a problem. At all. Commented Sep 23, 2020 at 10:37
  • What about "less efficient code"? Commented Sep 23, 2020 at 10:58
  • 1
    It’s a really bad example. There are two situations, and you want to encode that they exclude each other, when there is no reason to exclude it. Nothing wrong. Commented Sep 23, 2020 at 16:44
  • 1
    While I wouldn't bother "fixing" this code in a commit of its own, I would do this minor improvement if I had any other reason to change this class. Commented Sep 23, 2020 at 22:10