Skip to content

Allow predicate in Cols#2881

Merged
bkamins merged 10 commits intomainfrom
bk/cols_predicate
Sep 20, 2021
Merged

Allow predicate in Cols#2881
bkamins merged 10 commits intomainfrom
bk/cols_predicate

Conversation

@bkamins
Copy link
Copy Markdown
Member

@bkamins bkamins commented Sep 13, 2021

Fixes #2875

I was thinking that we might make it even more flexible and allow predicate to be mixed with other selectors in Cols, but for now I proposed a restrictive version. @nalimilan - do you think we should be more flexible?

@bkamins bkamins requested a review from nalimilan September 13, 2021 20:28
@nalimilan
Copy link
Copy Markdown
Member

Being restrictive sounds OK for now. Why does : need a special support? I would have thought it could be treated like any selector that can be included in Cols?

@bkamins
Copy link
Copy Markdown
Member Author

bkamins commented Sep 14, 2021

Why does : need a special support?

Ah - you are right. : is not a function but a constructor so it is not a subtype of Function so special treatment is not needed. I will fix this.

@bkamins
Copy link
Copy Markdown
Member Author

bkamins commented Sep 15, 2021

Ah - I was right originally Colon is a constructor but it is defined as:

struct Colon <: Function
end

so it is a Function. My original definition thus was required as otherwise Colon(:) treats : as a predicate. Things are tough.

Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@bkamins
Copy link
Copy Markdown
Member Author

bkamins commented Sep 20, 2021

@nalimilan - this should be good to have a look at again.

@bkamins bkamins merged commit df1b417 into main Sep 20, 2021
@bkamins bkamins deleted the bk/cols_predicate branch September 20, 2021 18:09
@bkamins
Copy link
Copy Markdown
Member Author

bkamins commented Sep 20, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Cols more flexible

2 participants