4 ms·
I'm torn about these features. On one hand I can see the usefullnes, but on the other hand I also expect them to be used in bad ways. Pattern matching for exam
by sharpercoder 10y ago
I'm torn about these features. On one hand I can see the usefullnes, but on the other hand I also expect them to be used in bad ways.
Pattern matching for example on types may indicate an OO design problem. Tuples may indicate an expression problem; often times a properly named class expresses intent much better.
As with any tool it is possible to misuse it, but pattern matching and tuples feel to me somehow as an especially fit tool to misuse.
- platz 10y agoThe sweet spot for tuples are single-use cases local to a function, not global tuples flying around