4 ms·
I wonder if "%" placeholder is the right approach. It makes the code longer in most cases. Without pipes: a = d(c(b)) With pipes in the proposed form:
by mg 4y ago
I wonder if "%" placeholder is the right approach. It makes the code longer in most cases.
Without pipes:
a = d(c(b))
With pipes in the proposed form:
a = b|>c(%)|>d(%)
My first approach to design it would be:
a = b~>c~>d
So the rule is that on the right side of the pipe operator (~>) there is always a function. We don't need parenthesis to indicate that.
If the function takes more than one argument, it can be defined by another value on the left of it.
Without pipes:
a = d(c(b,7))
With pipes in the proposed form:
a = b|>c(%,7)|>d(%)
With the ~> approach:
a = b,7~>c~>d
- tracker1 4y agoYour ~> operator is effectively the F# style pipelines (using |>) that have already been rejected twice... Personally, I was fine with F# style myself... Hack style in TFA is also fine, not sure on `%` specifically though. In either case, I've lost hope of seeing either pipelines or decorators actually make it through committee in my lifetime at this point... it's been about a decade now.
- mg 4y agoI haven't looked into F# pipelines for a while, because they seemed so bloated to me that it hurts. Isn't it that this: a = b|>c(%,7)|>d(%) Becomes something like this in F# pipes? a = b|>(b)=>c(b,7)|>d If not, what does it become? My suggestion is much shorter: a = b,7~>c~>d