urlyy commented on issue #2658: URL: https://github.com/apache/fory/issues/2658#issuecomment-3341115175
@chaokunyang I also learned it during this coding that the object itself can be passed into the `&self` position. Btw, the trait name must use `Fory` as a prefix (I haven't do this). And the method names are not necessarily required prefix. So which do you think is better: 1. `xx.fory_write(...)` 2. `ForySerializer.write(xx, ...) && ForyStructSerializer.type_def(xx, ...)` The performance of the two is the same. The 1st requires method names to have a prefix, but it still looks a bit more short. The second one results in code filled with static method–like function calls, which is more verbose, but it doesn’t require method names to have a prefix, maybe looks aligned with other langs. This affects both Fory-rs `developers` and its `users`. I think the 1st is better. -- 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]
