tommyettinger commented on issue #2345: URL: https://github.com/apache/fory/issues/2345#issuecomment-2986532909
It's a little tricky here because the relationship between `Map` and `AbstractMap` is reversed for `MapSerializer` and `AbstractMapSerializer`! Initially I thought `AbstractMapSerializer` was an abstract class, like `AbstractMap` in the JDK, but instead here it is a more general type that `MapSerializer` extends. The class names are unexpected, to say the least. Because `Abstract` as a class name prefix is used in the JDK only to refer to `abstract` classes (with that keyword, and almost always referring to a partially-complete class, like `AbstractMap` implementing an interface like `Map`), it doesn't seem correct here. I don't think `AbstractMapSerializer` should be renamed any time soon, because that would be a breaking change in a bugfix release for 0.11.1. Its class JavaDocs already seem good to me, saying `Serializer for all map-like objects.` and that seems accurate. If you could rename `AbstractMapSerializer` eventually, I think `MapLikeSerializer` would be self-explanator y and would match the term used in the class docs. I'm not currently using AbstractMapSerializer myself, since my map-like classes that don't implement `Map` can use a normal `Serializer`, and I'm happy with that so far. If there's a performance penalty for using `Serializer` instead of `AbstractMapSerializer` I might switch to using the less-general type, but I haven't yet noticed one. So far the default generated serialization code in Fury has been very fast to run, typically faster than even tailored `Externalizable` implementations unless significant data can be omitted using `Externalizable` by taking advantage of the data's specific properties. I may be slowing down my code, even though the serialized data is smaller, by writing my own serializers. So far no one seems to be using my serialization code, and I'm not either yet, but I do think I'll prefer Fory when I start needing saving/loading code. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
