Ever since I've dabbled a bit with Lisp my Python (and javascript) code has become much more functional-y. Still not sure whether this is a good or bad thing.
I think it's a double-edged sword. I've both written and read code in non-functional languages where the "easy" way of doing it is thrown aside for the "cool functional" way of doing it. Leading to code which was more fun to write, looks cooler, but is also hard to read and written in a different idiom to the actual programming language. Bad. I'm 100% guilty of this, although I try to stay vigilant. The other day I r…
Personally what I love most about using more functional code aren't the clever lambda's and stuff, I actually try to avoid that because it looks weird in Python. What's really awesome is enclosing named functions inside bigger functions and using closures.
The result is code where:
1. nobody can, by accident or intentionally, use inner functions of your algorithm,
2. self-documented code (function name says what the code block does)
3. you aren't passing a gazillion parameters around
4. or making everything messy with a bunch of unneeded OOP code. [I don't like useless OOP code. Objects-just-for-the-sake-of-encapsulation are silly.]
edited for wall-of-text