"Some people don't like switch/ case, I don't like some people"


  • 3
    @J-2FA I don't think anyone hates them, I think people hate they way they are used by incompetent programmers.

    Also IMO they're ugly at times!
  • 1
    @J-2FA the use of them is anti SRP and they should only be used for specific cases and they should be the whole content of the method they're in.
  • 0
    The only acceptable way switch cases should be used is when you have a list of >3 options that do different things. If else can look horrible otherwise.
Add Comment