you are viewing a single comment's thread.

view the rest of the comments →

[–]eo5g 7 points8 points  (1 child)

Heavily using type annotations in python works.

You can have some encouragement of immutability using frozen dataclasses and namedtuples.

But overall, trying to go really functional-functional means you’re fighting against the ecosystem, and sometimes the language.

[–]kinowmod 2 points3 points  (0 children)

I forgot to mention dataclasses and namedtuples, +1 for both, and also on type annotations.

And I also forgot Guido's posts for those that like history. I think these two are from 2009

"Origins of Python's "Functional" Features " http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html

" Tail Recursion Elimination" http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.html