It's not bad practice. In fact, it's considered concise and time-efficient.
Take a look at the following code that you have
switch(name){
case 'a', 'A' :
break;
}
The equivalent without using commas would be:
switch(name){
case 'a':
break;
case 'A':
break;
}
And the if-else
equivalent would be:
if(name=='a'){
//Do something
}else if(name=='A'){
//Do something
}
Of these, the first example took a mere 36 characters to type. The latter took 49, and the last one took 37 characters.
Moral? Using the comma is definitely more concise and time-efficient that using two cases with a single result. Even the if
statements would be more concise.