Is there any kind of convention regarding whether Serializers should be public or internal?
b
Ben Woodworth
07/04/2024, 6:58 AM
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
Michael Krussel
07/04/2024, 2:53 PM
I've found when i make it file private I get a lot of warnings when linking iOS frameworks.