3 ms·
case is pattern-matching, though. He said pattern-matching was sugar for "case/switch construct present in many, many languages". That implies pattern-matching
by Peaker 14y ago
case is pattern-matching, though.
He said pattern-matching was sugar for "case/switch construct present in many, many languages". That implies pattern-matching adds only syntax to the game, and that it doesn't add any useful things beyond the "switch" you find in C or Java, for example.
- Tyr42 14y agoI was looking for a forgiving interpretation of his statement. It's better to assume someone is right, and a little unclear, then just outright wrong.
- Peaker 14y agoSure, and I'd do the same if he said it was just sugar over "case", but he explicitly said "case/switch found in many languages", which makes it pretty definite IMO.