Skip to content

Why can't I use the membership operator together with the pipe operator? #780

Answered by antonmedv
stephanos asked this question in Q&A
Discussion options

You must be logged in to vote

In Expr, pipes designed to always work with function. Expr parser checks if there is a function call after a pipe. This approach simplifies a lot of things and makes syntax consistent.

One way to solve it is to use variables.

let user = tweets | find(.Content contains "Hello"); 
user.User

The get built-in keep it's type information. It's a special built-in and have a special handling in type check.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@stephanos
Comment options

@antonmedv
Comment options

@stephanos
Comment options

Answer selected by stephanos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants