yole, re: the typealiases best practices discussio...
# announcements
m
yole, re: the typealiases best practices discussion on reddit. I think it'd be OK to use typealiases for specialising primitives e.g.
typealias JWT = String
even though the compiler cannot catch any new errors this way. The reason being, that once Kotlin does support value types, it means only one place in the codebase to change (the typealias can be replaced with a value class that delegates to String), and all the existing use sites can be left alone. the semantic information that was already in the codebase now becomes checkable at compile time and runtime, without the need to go through and manually specialise the types in use already.
👍 2