Explaining pattern matching vs switch
问题 I have been trying to explain the difference between switch statements and pattern matching(F#) to a couple of people but I haven't really been able to explain it well..most of the time they just look at me and say "so why don't you just use if..then..else". How would you explain it to them? EDIT! Thanks everyone for the great answers, I really wish I could mark multiple right answers. 回答1: Having formerly been one of "those people", I don't know that there's a succinct way to sum up why