3 ms·
LOL Python is not functional. We got a crumb of FP with `itertools`, `functools` and `lambda`
by packetlost 4y ago
LOL Python is not functional. We got a crumb of FP with `itertools`, `functools` and `lambda`
- synergy20 4y agothe reality is, general programming language with FP capabilities is what flies in practice, pure FP language might be perfect, it's just hard to find coders for them, we will have to live with that. for HPC and ML, Python is dominant, I would expect to enhance python somehow with FP instead of anything else, then adding c/c++/rust/fortran libraries(e.g numpy) for intensive computing needs.
- noloblo 4y agowhat about GIL? https://wiki.python.org/moin/GlobalInterpreterLock https://wiki.python.org/moin/GlobalInterpreterLock why python can't thread? impact of GIL on python https://pythonspeed.com/articles/python-gil/ https://pythonspeed.com/articles/python-gil/
- synergy20 4y agoMy understanding is that even with GIL removed today, Python is still not a performant language for cpu-intensive tasks, be it single core or multiple-core. Python is better used as a glue language and leverage numpy etc to do the heavy lifting, numpy can work with multiple-core just like c/c++/rust languages can. If you really need launch multiple python processes, the multiprocessing module comes to rescue. While not ideal, I don't see a showstopper to use Python for HPC's high and parallel computation needs at all.
- karmakaze 4y agoPython isn't popular for data only because it's imperative, there's also the vast numerical processing ecosystem. Scala/Spark is an example where FP fits well.
- bigbillheck 4y agoWe almost lost map/filter/lambda in the python3 transition: https://www.artima.com/weblogs/viewpost.jsp?thread=98196 https://www.artima.com/weblogs/viewpost.jsp?thread=98196
- throwaway09432 4y agoPython lambda syntax is ugly as hell.