re: A New Coding Style for Switch Statements in JavaScript/TypeScript VIEW POST

re: I don’t agree with this, for three reasons: 1) there are more possibilities than things are the same or are different. It’s also possible, as is t...

1) Actually, that things are either handled the same or different is a literal dilemma without a middle ground. So in the context of their current handling they are either identical or different, regardless of their other similarities.

2) using the same shorthands twice in the same context is a recipe for confusion unless they actually mean the exactly same thing.

3) That's why I asked this as an open question. If things are actually so similar that you can handle them without too many extra cases, you should obviously do so – and if not, your variable names should reflect the difference.

I still disagree, for the reasons I stated above. I think we’ll just have to agree to disagree, but thank you for sharing your perspective!

Thanks for taking your valuable time to raise and discuss this point.

code of conduct - report abuse