My team has just spent 20 minutes trying to work out if this library is satire.
I love functional programming (use Elixir at work a fair amount), but almost every one of these examples is harder to read than than the equivalent "classic" Python (https://returns.readthedocs.io/en/latest/).
Plus, if you're going to write Python then deviating majorly from the normal approaches is going to require maintainers to learn a whole new way of doing things. Given the tools that Python provides, I don't think that's worth it for the benefit. Perhaps for some specific applications?
Your last point really resonated on the Django example for RequestContext - the entire point of using a framework is taking advantage of the set of tools and conventions it provides, and that code is basically reinventing the Django settings module. It’s almost always going to be better to write the simple standard code, or to pick an example which doesn’t start with an incorrect assertion to justify the extra complexity it’s adding. It does also make me wonder whether part of the problem is that they’re not used to a language with keyword arguments - passing a single parameter through a nested function call really shouldn’t get that strong negative reaction.
In general, this reminds me of the common problem where people assume their code will be reused far more often than it actually is and try to write code like the frameworks they’ve learned without considering whether they have the same resources to develop their new bespoke framework.
I love functional programming (use Elixir at work a fair amount), but almost every one of these examples is harder to read than than the equivalent "classic" Python (https://returns.readthedocs.io/en/latest/).
Plus, if you're going to write Python then deviating majorly from the normal approaches is going to require maintainers to learn a whole new way of doing things. Given the tools that Python provides, I don't think that's worth it for the benefit. Perhaps for some specific applications?