DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: I've never become overly convinced that switch statements are that much cleaner than `if else if else if else if else`

 
cescquintero profile image
Francisco Quintero πŸ‡¨πŸ‡΄

Isn't this feature called method overloading ? πŸ€”

Thread Thread
 
giovannicodes profile image
Giovanni CortΓ©s

No, because overloading is have same parameters with different types, but in patter matching you can have the same type and number of parameters but differs in the content. For example, here!