I don't see how that's any different or better tha...
# language-proposals
j
I don't see how that's any different or better than the parcel adapters that are already in the proposal. In fact, the wrapper allocation makes it seem worse.
m
Adapters must be written by hand, if I understood correctly.
j
But so must that wrapper class and you still need to write custom parcel code to serialize the Something.
m
And thus I propose to support auto-generated parcelable wrappers.
j
I see no way for that to work. Pretend Date wasn't Serializable. How would it work?
e
For Kotlin Serialiazation we have a vision of "external serializers" that you can define for 3rd-party classes. For now it works only on per-field basis like
@Serializable(with = MyDateSerializer::class) var date: Date = ...
In the future, we are exploring ways to define them per-type. We can use similar approach for parcelling. Btw, we've created #serialization channel
j
Right, and that's the parcel adapters which are in the proposal. I still have no idea what @miha-x64 is proposing.