chaokunyang commented on PR #2146: URL: https://github.com/apache/fury/pull/2146#issuecomment-2815816221
> @chaokunyang Here is a suggestion. > > Currently, there are many `writeXXX`, `xwriteXXX`, `readXXX` and `xreadXXX` methods in `Fury.java`. Is it possible for us to define an abstract class to summarize these interfaces by following the example of #2139? > > In this way, we can delete the `Fury#xwriteXXX` and `Fury#xreadXXX` methods(At the same time, it can also reduce the logic within Fury.java). The cross-language details can be handled in the respective implementation subclasses of this abstract class. This is what `SerializationBinding` does. And I don't think we can remove things like `Fury#xwriteXXX` and `Fury#xreadXXX`. It's not only used in `SerializationBinding`, but also used outside of it. `SerializationBinding` is desgined for internal usage only, I don't want to expost it users. And `Fury` itself is the obly entrance class, I don't think we should add other entrance class. Another issue for abstract class is the runtime cost, the polymorphic virtual method call cost is very expensive,, which is we try to avoid -- 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]
