3 ms·
>What exactly does "having code structured around the shape of tuples returned by function" even mean? Not the OP, but pattern matching makes the code more con
by floxy 6y ago
>What exactly does "having code structured around the shape of tuples returned by function" even mean?
Not the OP, but pattern matching makes the code more concrete and less abstract. Looking at it from another point of view, it is the opposite of duck typing. Or makes things less generic. Now you need to pass in a tuple, where as for a different solution, a tuple could have been used, or a list, or your own class that responds to __getitem__, etc.. This is a well known limitation in the Haskell world.