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

Ripping the name-clashes bandaid off #128

Open
bitemyapp opened this issue Feb 2, 2016 · 4 comments
Open

Ripping the name-clashes bandaid off #128

bitemyapp opened this issue Feb 2, 2016 · 4 comments

Comments

@bitemyapp
Copy link
Contributor

screenshot from 2016-02-01 20-48-46

I use Yesod, Aeson, Persistent, lens, and Esqueleto in my day to day work. Esqueleto is the only library that clashes with anything else I use. This is beginning to drive me nuts.

Would you consider a major version change to finally give Esqueleto its own names and operators that don't overlap with anything else?

@meteficha
Copy link
Member

Doesn't bother me much, as you'd expect from the fact that I didn't change them :). There are also two practical issues with changing them:

  • Forcing everyone to rewrite all of their queries, or at the very least changing their imports to a compatibility module.
  • Finding out a new set of operators that look good and don't clash with anything.

@bitemyapp
Copy link
Contributor Author

@meteficha I know these are costly issues but I'd rather do it sooner than later to avoid the problem growing. The number of Haskellers and Haskell projects out there is growing and will be growing faster over time.

I am happy to help with both issues if you're willing to commit to a release that deals with this.

My suggestion:

First release of the new names/operators

Database.Esqueleto.Functions and Database.Esqueleto.Operators are added, there's a single module that exports both. These are exclusively the new, non-conflicting names. I'd like it if all operators had an ordinary named prefix function that does the same thing as well, so that the operators are only nice syntax, not obligatory.

Database.Esqueleto stays the same.

Bandaid gets ripped off, next major release

Functions and Operators stay as they are, but Database.Esqueleto now re-exports those names.

How does this sound to you?

@bitemyapp
Copy link
Contributor Author

@meteficha could I get a thumbs up/down on this please? If there's an alternative approach you'd be open to, I'd like to hear that as well but this remains a day-to-day albatross at work.

@meteficha
Copy link
Member

I'm really not a fan of having two names for the same things. That will make it confusing to read and write. Furthermore, esqueleto will appear less like SQL. So the Functionsmodule is not going to happen.

Regarding the operators, I'm at a loss about a set of operators that look nice and don't conflict with the plethora of libraries that already exist. I'm not looking forward to searching for this set myself. The decision about whether to transition esqueleto to a new set is dependent on what the new set is. I can't commit to making a change I know almost nothing about.

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

No branches or pull requests

2 participants