3 ms·
How does pattern matching solve the same problem?
by cannabis_sam 5y ago
How does pattern matching solve the same problem?
- munificent 5y agoIt gives you a very nice notation for checking if a value has some type and, if so, binding a new variable that refers to it as that more specific type.
- cannabis_sam 5y agoHow does that solve the problem of statements being devoid of return information? Also, what? Pattern matching differentiate between values of a single type, and while the assignment mechanism is a great nice-to-have, it still completely follows the basic type consistency that actually typed functions provide. Statements have none of these qualities..
- munificent 5y agoI'm sorry, but we seem to be talking past each other. Why is it a problem that statements are "devoid of return information"? A statement occurs in a position where, by definition, no value it produces will be used.