-
Notifications
You must be signed in to change notification settings - Fork 1.1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Mirror.ProductOf instance for Value class #17800
Comments
Instead of using value classes why not use opaque types? |
Both are supported, so derivation should be available for both. |
Yes it should be available for both. I was not trying to say otherwise. Opaque types have the guarantee of no overhead, value classes don't because some times there is boxing involved. The way I see it is: you will eventually have to migrate to opaque types why not migrate right now and benefit from no overhead and support for Mirrors? |
This rationale of asking people to migrate all value classes to opaque types could make sense in the end ... Could ... But not sure ... Otherwise value classes would have been removed or at least been deprecated. Anyway, that's not a good strategy to me to ask to migrate all the value classes whereas that's quite easy to have derivation for. |
From Scala 3 Overview
|
Value classes also remain relevant when cross-building for Scala 2 and 3. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
For now, Value classes are not provided
Mirror.ProductOf
instances.Something as below could be used.
Usage:
The text was updated successfully, but these errors were encountered: