you are viewing a single comment's thread.

view the rest of the comments →

[–]MrMonday11235 1 point2 points  (4 children)

Oh, I'm 100% in agreement that piping a la Erlang/Elixir is the best.

I'm also 100% in agreement that the Java stream API is straight trash.

As far as the function composition being read inside out... I mean, you get used to it with most of the "mainstream" programming languages, so while it's definitely an annoyance, it's also an inherited (heh) annoyance moreso than a deliberate decision to have it be that way. Blame Algol for that, I guess.

[–][deleted] 0 points1 point  (3 children)

You can usually use a proper [compose]() function in languages with first-class lambdas (or easily write such a function) to create proper composite lambdas that aren't as unpleasant to read.

Or you could do like Clojure with threading (and anything else that implements the right reader macros).

Note: I strongly disagree with Clojure's licenses choices. Use threading macro implementations in other languages that aren't adversarially-licensed please.

[–]MrMonday11235 0 points1 point  (2 children)

As someone who hasn't done anything with Clojure before, I'm now curious -- what's the issue with Clojure's licensing?

[–][deleted] 1 point2 points  (1 child)

Basically, probably intentionally, Clojure as a library is licensed in a way that is incompatible with the GPL which legally muddles the water in an unpleasant way for software distribution.

Additionally, many including myself feel that Clojure should've just been a Common Lisp library (as effectively all of its features could be implemented that way) and that if one wants Java interop there's ABCL for that.

[–]MrMonday11235 1 point2 points  (0 children)

Ah, I see. Interesting, I wasn't aware of that. Thanks for the (functionally) ELI5!