I once got a bee in my bonnet about pipelines only working with the first argument. I wanted to use _ as a way to signal where the pipeline argument should go kind of like scheme. I got as far as a first pass implementation before I read the contributor guidelines. Turns out people had been suggesting changes for years, including the one that I implemented. I was so invested I almost tried posting it, but decided that nobody would like that very much.
Ultimately, I’m glad that they found something that fits with their vision and doesn’t impose any overhead.
Well, José suggested something like that and I have created library that provides such functionality. I have created poll and discussion what operator should be used and I landed on .... I doubt that it will be merged into core now, as there is then/2 which basically provides the same functionality as a function.
The problem with _ is that it is commonly used as a “discard” placeholder, which mean, that it can be confusing (and can break some macros). ... is much less commonly used, so it is hard to break something in the process.
I liked _ because it had that extra context. To me it meant “and place something here”. Obviously, it was a bit controversial because different people have different opinions about it.
then
looks nice!I once got a bee in my bonnet about pipelines only working with the first argument. I wanted to use _ as a way to signal where the pipeline argument should go kind of like scheme. I got as far as a first pass implementation before I read the contributor guidelines. Turns out people had been suggesting changes for years, including the one that I implemented. I was so invested I almost tried posting it, but decided that nobody would like that very much.
Ultimately, I’m glad that they found something that fits with their vision and doesn’t impose any overhead.
Well, José suggested something like that and I have created library that provides such functionality. I have created poll and discussion what operator should be used and I landed on
...
. I doubt that it will be merged into core now, as there isthen/2
which basically provides the same functionality as a function.For what it’s worth I do prefer something like
_
or...
, butthen
feels close enough for my taste.The problem with
_
is that it is commonly used as a “discard” placeholder, which mean, that it can be confusing (and can break some macros)....
is much less commonly used, so it is hard to break something in the process.I liked _ because it had that extra context. To me it meant “and place something here”. Obviously, it was a bit controversial because different people have different opinions about it.
Those IEx QoL changes are the highlight of my week