3 ms·
> In PyFL gone are all the things that ordinary people find difficult or downright weird: monads, mandatory currying, post- or prefix notation, pattern matching
by josephcsible 5y ago
> In PyFL gone are all the things that ordinary people find difficult or downright weird: monads, mandatory currying, post- or prefix notation, pattern matching, etc. Instead infix notation and f(x,y,z) syntax for function application. The weird stuff has it’s proponents but PyFL proves it’s not inherently part of functional programming.
Textbook case of falling victim to the Blub Paradox.
> The answer is … int! Yes, PyFL has typed an untypable program!
I'm not sure why the author is making this sound like a good thing.
- smaddox 5y agoTotally agree about the Blub Paradox, but there's definitely value in Self Types. See, for example, [Kind](https://github.com/Kindelia/Kind https://github.com/Kindelia/Kind), which is able to type recursive data types by using Self Types.
- bmc7505 5y agoIt should be noted that self types are non-trivial to implement and if one is not careful when using them, impredicativity can lead to inconsistent or undecidable definitions.
- josephcsible 5y agoBut does PyFL actually use Self Types rigorously, or is this only working because there's a hole in the type system?
- smaddox 5y agoTo clarify: Kind is able to type lambda-encoded recursive data types with Self Types. This is something that is not possible in Haskell.