3 ms·
I also Julia, but agree with all these points. And I'll add one more: It is difficult to chain a value through a series of function calls. Meaning you can't d
by thayne 5y ago
I also Julia, but agree with all these points.
And I'll add one more:
It is difficult to chain a value through a series of function calls. Meaning you can't do something like `a.b().c().d().e()`. You either have to store intermediate results in variables, call it like `e(d(c(b(a))))` which IMO is less readable, or do something like this:
a |> x -> b(x) |> x-> c(x) |> x -> d(x) | x -> e(x)
there is some hope of this getting improving in the future, but in the present, it bugs me.
- jakobnissen 5y agoOP here. Try using `Transducers`. It has problems of its own, but it does address most of my issues with Julia's iterators, including that one.
- klaff 5y agoWhy did you write all those anonymous functions? You can just do a |> b |> c|> d |> e although there are style guides that discourage that and instead recommend using a line for each with good temp variable names.
- thayne 5y agoah, in this case that works. although it doesn't if you have additional arguments to b,c,d and e. I guess I should have crafted my example better.
- BadInformatics 5y agohttps://github.com/jkrumbiegel/Chain.jl https://github.com/jkrumbiegel/Chain.jl would probably work there, but you're not the only one who would like to see this in the language/stdlib itself.