-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
instance/syntax traits and binary compatibility #496
Comments
How would you support à la carte vs. I may have missed some discussion about this, but the project is young enough that it seems like it might be better to bump the minor version after every release (and save patch versions for really bad mistakes) instead of distorting code to ensure 100% binary compatibility (which we explicitly don't guarantee yet, anyway). |
@travisbrown I was envisioning the traits being I agree that bumping the minor version is fine for now. This is something I was aiming to address by a first 1.0 RC. |
@ceedubs Oh, got it. I wouldn't be strongly opposed to making them |
I think I'm more interested in being able to add type class instances without waiting until the next minor version. For example "oops we defined the monad for EDIT: to clarify my message, I'm saying that doing the same for syntax isn't as important to me. |
This is related to typelevel#496, but it's a broader issue than just this change. These instances traits/classes are used internally for code organization and implicit prioritization, but they aren't really meant to be part of the public API. Making them private/sealed may be helpful for binary compatibility in the future. It also may be a helpful indicator to newcomers which traits/classes are actually meant for consumption, so they can ignore some of the noise. So far, I have left the traits for orphans from `std` (such as `StringInstances`), and I have left the omni-instance traits exposed.
@travisbrown at one point on Gitter you mentioned that you've grown fond of having the instance traits exposed. However you said you'd wait until you weren't on your phone to expand upon why. Do you want to weigh in on this issue with your use-case? |
@ceedubs It's partly just a vague dislike for introducing type class instances with imports, and I won't try to defend that. The more interesting part is that being able to use the instance / syntax traits means that I can effectively "re-export" syntax, etc. for my own types—e.g. I can mix |
I'm going to close this out. I've think we've pretty much settled on a convention somewhere in the middle. |
Currently we have quite a few places where we have traits that are neither sealed nor private that house instances and syntax. For example the
Option
instances and theOption
syntax.Adding a new instance or method to these traits is a change that is not binary compatible. Ideally, we could freely add new instances or syntax and not have to worry about waiting until the next minor version to merge them.
Personally I know that I always get my syntax/instances via imports as opposed to mixing in traits. How much do other people value being able to mix these in instead of importing them?
The text was updated successfully, but these errors were encountered: