One of the big problems with `typealias` is that i...
# announcements
k
One of the big problems with
typealias
is that it doesn't offer any type safety. For example, say I'm packing a 2D coordinate of `Int`s in a
Long
, I don't want the
Long
value to ever be interpreted as a number nor the other way around.
m
gotcha. i suppose another way of doing this would be to add an extension method to Longs like
Long.toMyInline
which is how you have to do things with integers and unsigned primitives anyways.
but at that point, might as well just use the constructor syntax