
Function and method chaining. Procedural/function syntax for chains of function calls suck. It is too verbose (heavy on parentheses) and written backwards: print(sort(filter(transform(merge(extract(data)), args)))) To be honest, I think _this_ is the problem that I was trying to address, with my proposed solution of implementing map reduce methods on Iterator class. IIRC, there's already a thread on method chaining.
There is a powerful design pattern to fix this, that works great with immutable data and functions: https://martinfowler.com/articles/collection-pipeline/ I'll check this out!
A long time ago, I wrote a helper class to do that: https://code.activestate.com/recipes/580625-collection-pipeline-in-python/?i... Heavy data processing frameworks and libraries like Pandas already use method chaining extensively. It would be great if we could chain function calls. Saw this beauty too :)
Shells such as bash have an excellent syntax for this: data | extract | merge | transform args | filter | sort | print Method chaining is good too: data.extract().merge.transform(args).filter().sort().print() except for the downsides discussed previously. It would be very, very nice if we had syntactic sugar for that chain of function calls that would work on general functions and methods. This syntactic sugar would definitely increase readability. I remember Elixir has something similar like |> to indicate the data flow.