Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’ve really come to miss reduce in Python’s builtins since std::accumulate has become a staple in my C++ development. It seems surprising that with Python 3’s increased support for functional concepts, it would relegate reduce to the standard library.


Not really, increasing support for functional concept was never a goal of Python 3 (or at all), it was mostly incidental and it did regress in other ways than just shoving the (relatively little used due to the existence of min/max/any/all) out of the builtins e.g. while extended unpacking was added, unpacking iterable function parameters was removed.


+1 for the std::accumulate reference, and I'll add an honorable mention of std::transform which since C++17 also runs in parallel.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: