Is there any kind of convention regarding whether ...
# serialization
e
Is there any kind of convention regarding whether Serializers should be public or internal?
b
For the most part it's usually an implementation detail, so I lean towards making it internal (or file-private) and let it be accessible from the
Type.serializer()
function. Gives you more flexibility to change it around internally, and you can always make it public later. If it isn't an implementation detail, like if it's configurable with a special constructor or if the serializer class meant to be open and extendable, then I'd make it public
👍 1
m
I've found when i make it file private I get a lot of warnings when linking iOS frameworks.
👀 1