3 ms·
I can see the argument for pattern matching, but algebraic data types seem entirely out of place. The primary benefit would be type checking and exhaustivity ch
by brandonbloom 13y ago
I can see the argument for pattern matching, but algebraic data types seem entirely out of place. The primary benefit would be type checking and exhaustivity checks: neither of which fit with the dynamic nature of Python.
Functional != Strongly Typed
- tel 13y agoThe regularity of ADTs is nice, too, though tagged unions feel weird in dynamic languages.
- dchichkov 13y agoArgument matching has been discussed, there've been PEPs on that, and they couldn't come up with a satisfactory syntax. And that whatever you try, 'if/elif' statements are just more readable and streamlined than any syntax they've try to come up with. As to strongly typed. Has anyone considered a strict attribute in python, I wonder? Because I'd love [1] to have compile time type checks for types/variables that I'm worried about. [1] certainly not at a cost of having to contend with type hierarchies of a strongly typed language.