2 ms·
It's a weird synthesis, but I wouldn't frame it as hostile. A functional programming style has always been at odds in the Python world. OTOH, you have functools
by agentultra 16y ago
It's a weird synthesis, but I wouldn't frame it as hostile. A functional programming style has always been at odds in the Python world. OTOH, you have functools and itertools, et al. On the other, classes and a preference for explicit loops.
Yet even in Python3 where reduce has been moved around, there's still the spirit of functional programming present. The map, filter, reduce functions all return generators. This is a pretty good improvement as you can now use them on (theoretically) infinite sequences.
Yes, lambda is the lame, dead horse. It's just a syntactic issue. I'm sure most people in the Python world would be happy to receive a multi-line lambda that can return more than just an expression. It's just that no one has been happy with any of the syntax proposals to make it happen.
However, there are other things about lambda in Python that make it difficult to implement as well. But I think baby steps are important.
Is a fork necessary? Well... it would be nice to see some people experimenting with getting lambda to work. However I don't think a fork of the interpreter is necessary just to support a style of programming. Indeed Python prefers one way to do things, but functional programming has proven practical enough I think to be an exception to the rule and so it lives on. Sort of. :)