Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename where{,Not}Exists to present and absent respectively #57

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

shane-circuithub
Copy link
Contributor

@shane-circuithub shane-circuithub commented Jun 19, 2021

Should I add back the old ones with a deprecation warning, or can we get away with this?

@ocharles
Copy link
Contributor

I'm honestly not really sure these names add much beyond what we already have. They don't match anything I'm already familiar with as a Haskeller, and it breaks the slight symmetry we have with where_.

@shane-circuithub
Copy link
Contributor Author

shane-circuithub commented Jun 19, 2021

whereExists and whereNotExists to me feel like ugly SQLisms, it's just translating the SQL literally into Haskell. I don't mind the names semijoin and antijoin, but those names sound like they should be for binary operators, whereas these are unary (but are equivalent when used applicatively/monadically). I feel like we've always lacked a nice concise name for the "unary" versions. And just because Haskell doesn't have any well known idioms for semijoins doesn't mean we can't be the ones to change that! 🙂

But yeah, whereNotExists in particular is already too unwieldy for my liking, but now that I've figured out how to make Tabulation versions of these, I'm definitely not going to want to be typing whereNotExistsTabulation. But absentTabulation is fine. I guess that's one of the reasons I strongly prefer shorter names for concepts like this: they're more morphologically productive. Whereas long names are already morphologically saturated and so can't really be built upon. But semijoins and antijoins are such natural concept in relational algebra that it definitely makes sense to leave morphological "room" for people to build upon them.

Does that make sense?

@ocharles
Copy link
Contributor

I understand a bit of your comment, though you have lost me at morphological. I'm afraid I'm still struggling to see a benefit in present and absent, so not really sure what to do. I would say that tabulation is already such a unique concept, I am OK with presentTabulation and stuff. In fact, if we don't use the names present and absent, you could even just use those.

@ocharles
Copy link
Contributor

Discussion is being continued at #65

Copy link
Contributor

@ocharles ocharles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the discussion is in favor of your suggestions. I think we can get away with just breaking the API for now. Could you add an entry to Changelog.md?

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.

None yet

2 participants