Will inline classes allow to wrap a pair? would be...
# announcements
r
Will inline classes allow to wrap a pair? would be nice to have named pairs without overhead
a
Pair as in two values or a single Pair instance?
r
single
Pair
instance, as far as I know only one value is allowed
b
Yes, you can wrap
Pair
instance
r
nice 🙂
b
you can wrap any object you like
a
you can wrap any single property with an inline class
b
The only thing I have not tried is to wrap another inline class
n
wrapping a UInt is possible then ? nice.. for different kinds of ids
b
I just tried it out. It seems to work.
k
Why would you wrap
Pair
? Just do
data class Point(val x: Int, val y: Int)
r
@karelpeeters You're right. What was I thinking 😄