What is the reasoning behind using `fun serializer...
# serialization
m
What is the reasoning behind using
fun serializer() =
instead of
val serializer get() =
/
val serializer =
? I’m working on a library which stands before a similar decision and would love to hear it :)
s
mainly because of consistensy with
fun serializer(typeSerialzerOne: KSerializer, typeSerializerTwo: ...)
— such functions are generated for generic classes with type parameters
m
Makes sense, thanks! So I’ll use
fun
to be forward-consistent in case I’ll have to do something similar 🙂