3 ms·
That's true, but for those tasks, it's not clear you need to abandon imperative languages at all. In cases where you're just doing the same operation on all ele
by _delirium 15y ago
That's true, but for those tasks, it's not clear you need to abandon imperative languages at all. In cases where you're just doing the same operation on all elements in an array, with no data dependency, you can do that in C without fiddling with pthreads by using OpenMP's "parallel for" construct.
FP promises to make it less error-prone and practical to do more complex parallelization than these trivial kinds of parallelization, but the skeptical take (which I partially share) wonders whether that is a big win. In other words, are the trivial parallelizations just the 10% tip of the iceberg, and there are 90% wins left from more complex parallel programming (in which case perhaps FP is what lets us unlock that future), or is trivially parallelizable stuff more like 90% of the parallelization win?
- bunderbunder 15y agoWith the question posed that way, I think I fall on yet another skeptics' side. Regardless of whether it's the majority of the win or not. Suppose, for the sake of argument, that the non-trivial parallelization stuff is complicated enough that it's really not feasible for folks in general to be tackling it outside safety of what's effectively being billed as a linguistic walled garden. If that's the case, then the previous sentence ended about 13 words too late. Difficult, error-prone tasks like that should really be handled by a library or run-time.