You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a brainstorming exercise, can you try figuring out if there's any way you can avoid using the case block here?
Usually the switch-case block is regarded as unclean code. I don't quite agree with that. What I do think is that the tendency is generally to misuse it and hence it ends up getting used in inappropriate places. I think your current use of it is fine. But like I mentioned, as an exercise, just think about other means through which you can implement the same (no need to update the code or anything).
The text was updated successfully, but these errors were encountered:
As a brainstorming exercise, can you try figuring out if there's any way you can avoid using the case block here?
Usually the switch-case block is regarded as unclean code. I don't quite agree with that. What I do think is that the tendency is generally to misuse it and hence it ends up getting used in inappropriate places. I think your current use of it is fine. But like I mentioned, as an exercise, just think about other means through which you can implement the same (no need to update the code or anything).
The text was updated successfully, but these errors were encountered: