4 ms·
Python isn't only unwieldly because of dyanamic typing, but also because it eschews functional idioms. JavaScript is much better in this regard, and it makes th
by nicoburns 6y ago
Python isn't only unwieldly because of dyanamic typing, but also because it eschews functional idioms. JavaScript is much better in this regard, and it makes the code much more maintainable.
- p7g 6y agoDo you have any examples in mind?
- legerdemain 6y agoSure, `reduce()` was removed from the standard library between Python 2 and Python 3. Here is Guido arguing that `lambda` and several other functions should be removed as well.[1] [1] https://www.artima.com/weblogs/viewpost.jsp?thread=98196 https://www.artima.com/weblogs/viewpost.jsp?thread=98196
- klibertp 6y ago> `reduce()` was removed from the standard library Not true: it was moved from builtins to `functools` module, but it's still there.
- legerdemain 6y agoPlease tell Guido that he got it wrong! > Only reduce will be removed from the 3.0 standard library. You can import it from functools.
- geofft 6y agoHe did, in fact, misspeak. functools is part of the standard library, and was part of the standard library in 3.0, and contained reduce: https://github.com/python/cpython/blob/3.0/Lib/functools.py#L10 https://github.com/python/cpython/blob/3.0/Lib/functools.py#... What he meant to say is that it's removed from the list of builtins.