4 ms·
> But in general Python devs seem to prefer "explicit" ad-hoc syntax for each use case instead of composable "primitives". I hope you don't consider JS having
by bvrmn 1y ago
> But in general Python devs seem to prefer "explicit" ad-hoc syntax for each use case instead of composable "primitives".
I hope you don't consider JS having "composable primitives". To backup my point: there is no anything similar to underscore-like libraries for Python. All is covered by stdlib and syntax.
> for(in) / for(of)
Cough, cough.
- jampekka 1y agoLibraries like underscore are possible because of JS having composable primitives. JS has many many warts, and the for-loop is a good example of this. And the _.each is a good example how the core JS allows for working around it.
- bvrmn 1y agoBut underscore is literally a bunch of functions taking lambdas. Python also has functions and lambdas. [1] shows it could provide the same interface. I don't get what composable primitives JS has. [1]: https://pydash.readthedocs.io/en/latest/ https://pydash.readthedocs.io/en/latest/