44
Statically Typed Functional Programming with Python 3.12
(wickstrom.tech)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
This is clever and worth reading, and I didn't know about some of the 3.12 changes. Overall though I think the author has some pain in store. Using functions like map in Python result in Python iterators which are mutable objects (they consume and throw away an element of the sequence on each iteration) and this often causes hassles unless you convert them to lists (which burns memory and maybe does unnecessary computation). Also, Python's type checking stuff (at least Mypy) are mostly a bug catching feature. They aren't like a real type system though: mistyped programs can still get through, and properly typed ones can get flagged. It's better than nothing and I use it, but it's nowhere near e.g. Haskell.