4 ms·
>> And, the parallel problem would be clarity of data flow, and I'm not sure that expression-oriented is a huge win in that area. In my opinion it is, because
by smnplk 5y ago
>> And, the parallel problem would be clarity of data flow, and I'm not sure that expression-oriented is a huge win in that area.
In my opinion it is, because you can compose data transformations from smaller parts. Each part can do only one thing.
For example in Clojure, you could do.
(def transform
(comp
(do-thing-a)
(do-thing-b)
(do-thing-c))
(map transform my-collection)
Or you could use a threading macro, with thread first or thread last semantics, which can also help you build clear pipelines.
(-> basket-of-apples
(select-ripe)
(clean)
(cut-to-pieces-of-size 4)
(pack))
Not to mention transducers, which can further improve and clarify data flows.