Hacker News new | past | comments | ask | show | jobs | submit login

> generator expressions can be expressed using lazy list semantics

That does not change the fact the results are given in a certain order. Lazy list semantics means the data will be calculated as it's needed, therefore, the calculation cannot be parallelized.





I was talking about Python. A list comprehension is defined as having the behavior of a loop.


Once again, that doesn't semantically make a difference, unless the loop is side-effecting. However, even without side effects, Python cannot necessarily make any kind of guarantee about such computations since arrays are mutable and can be modified out from under the map.

This is why parmap equivalents take iterables in Python, not arrays. It doesn't matter if you have lazy or eager semantics, only if your semantics are side-effecting.




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

Search: