
On Wed, Dec 1, 2021 at 6:14 PM Abdulla Al Kathiri <alkathiri.abdulla@gmail.com> wrote:
Thanks for the clarification. Yeah I agree it will look ugly if we use it not as a first argument many times in a row but what if there is one or two functions in the middle that they are not playing along and don’t have teamwork ethics, meaning they put the parameter we are interested in as a second or third parameter or as a keyword only parameter and it will make really good sense to chain those calls? I believe an option should be given to the programmer to do this, but it shouldn’t be encouraged to do it a lot. _ could be used as a placeholder or anything really. 1 -> add(2) -> pow(3, _) equivalent to 1 -> add(_, 2) -> pow(3, _). _ is where your output goes into. _ as a first argument can be omitted.
It's always possible to make a proposal more general by making it less clean. Is the loss of generality from "must pipe into the first argument" (or "must pipe into last argument", pick whichever one you want to go with) actually as restrictive as you think? People don't tend to write add() and pow() like this, because we have operators. With real-world code, how commonly is this actually going to be a problem? ChrisA