Earlier quoted context omitted.
Why, if you don't have to, would you write the functions in reverse order of when they're applied?
Because it makes more sense?
Pipelining might be my favorite programming language feature
51–60 of 360 posts
Re: Pipelining might be my favorite programming language feature
#52Is this pipelining or the builder pattern?
Re: Pipelining might be my favorite programming language feature
#53Am I the only one who thinks yuck? Instead of writing: a().b().c().d(), it's much nicer to write: d(c(b(a()))), or perhaps (d ∘ c ∘ b ∘ a)().
Why, if you don't have to, would you write the functions in reverse order of when they're applied?
Re: Pipelining might be my favorite programming language feature
#54While the author claims "semantics beat syntax every day of the week," the entire article focuses on syntax preferences rather than semantic differences. Pipelining can become hard to debug when chains get very long. The author doesn't address how hard it can be to identify which step in a long chain caused an error. They do make fun of Python, however. But don't say much about why they don't like it other than showi…
Re: Pipelining might be my favorite programming language feature
#55 a().let{ b(it) }.let{ c(it) }Re: Pipelining might be my favorite programming language feature
#56C# has had "Pipelining" (aka Linq) for 17 years. I do miss this kind of stuff in Go a little.
Agreed. It would be nice if SQL databases supported something similar.
Re: Pipelining might be my favorite programming language feature
#57Earlier quoted context omitted.
You can add peek steps in pipelines and inspect the in between results. Not really any different from normal function call debugging imo.
Yes, but here's my hot take - what if you didn't have to edit the source code to debug it? Instead of chaining method calls you just assign to a temporary variable. Then you can set breakpoints and inspect variable values like you do normally without editing source. It's not like you lose that much readability from foo(bar(baz(c))) c |> baz |> bar |> foo c.baz().bar().foo() t = c.baz() t = t.bar() t = t.foo()
fn get_ids(data: Vec) -> Vec {
data.iter()
.filter(|w| w.alive)
.map(|w| w.id)
.collect()
}
It sounds to me like you're asking for linebreaks. Chaining doesn't seem to be the issue here.Re: Pipelining might be my favorite programming language feature
#58C# has had "Pipelining" (aka Linq) for 17 years. I do miss this kind of stuff in Go a little.
Agreed. It would be nice if SQL databases supported something similar.
Re: Pipelining might be my favorite programming language feature
#59Earlier quoted context omitted.
Cool I love it, but another thing we will need polyfills for...
How do you polyfill syntax?
Re: Pipelining might be my favorite programming language feature
#60You can somewhat achieve a pipelined like system in sql by breaking down your steps into multiple CTEs. YMMV on the performance though.