I did not see an issue, so let me comment directly.
How about allowing this annotation to be given to a single constructor or function as well?
I think there are only a limited number of situations where value class would be a problem.
Therefore, I feel that assigning value class on a per-class basis unnecessarily undermines the value of value class.
In addition, value class may not be defined or modified by the user.
Examples are unsigned integers and kotlin.time.Duration.
I did not see an issue, so let me comment directly.
How about allowing this annotation to be given to a single constructor or function as well?
I think there are only a limited number of situations where
value class
would be a problem. Therefore, I feel that assigningvalue class
on a per-class basis unnecessarily undermines the value ofvalue class
.In addition,
value class
may not be defined or modified by the user. Examples areunsigned integers
andkotlin.time.Duration
.