Skip to content

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

Merged
shane-circuithub merged 1 commit intomasterfrom
present
Jun 22, 2021
Merged

Rename where{,Not}Exists to present and absent respectively#57
shane-circuithub merged 1 commit intomasterfrom
present

Conversation

@shane-circuithub
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

Discussion is being continued at #65

Copy link
Copy Markdown
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.

2 participants