-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Milestone
Description
I'm not sure if the current plan is to keep @linq or not, but if it is kept, I think a different name would make more sense. @linq only makes sense if you're a former C# programmer. Perhaps @query instead?
Also, I'd like to argue in favor of keeping @linq, or rather @query. Here's a query from the README that uses Pipe.jl (except I've changed :a to a, etc).
using Pipe
out = @pipe df |>
@transform(_, y = 10 * x) |>
@where(_, a .> 2) |>
@by(_, b, meanX = mean(x), meanY = mean(y)) |>
@orderby(_, meanX) |>
@select(_, meanX, meanY, var = b)What I would prefer is a begin block syntax like this:
using Pipe
out = @query df begin
transform(y = 10 * x)
where(a .> 2)
by(b, meanX = mean(x), meanY = mean(y))
orderby(meanX)
select(meanX, meanY, var = b)
endI think the begin-block syntax is much easier to read. The second example avoids the noise from all the @, _, and |> symbols.
Actually, I already have an open issue for begin-block syntax for the @linq macro: #136
matthieugomez and adkabo
Metadata
Metadata
Assignees
Labels
No labels