Hacker News new | ask | show | jobs
by wlievens 5885 days ago
How is

    (maintain-order (parallelize employees))
vs

    MaintainOrder(Parallelize(employees))
"admittedly more attractive"? I enjoy functional constructs, but now you're just talking syntax right?
2 comments

I agree, this is a strange claim. On the other hand (as long as we are with Clojure), something like

  (->> employees parallelize maintain-order)
might be said to be more attractive because it looks more linear. The sequential order of application is thus maintained, and the parentheses which are perceived as additional levels of hierarchy are removed.

Of course, the dot-dot-dot style in Java/C#/etc is doing the same:

  employees.Parallelize().MaintainOrder() 
is also linear, the parentheses are only used to specify parameters.
I'm just being a smug weenie is all. Obviously there's not a real difference here. However, it's a better question as to whether this style or the "pipeline" style illustrated below and in the C# code is more pleasant.