chaokunyang commented on PR #3073: URL: https://github.com/apache/fory/pull/3073#issuecomment-3680936459
We could flip the default behavior. I originally added the auto `impl Default` just as a convenience to reduce duplicated code, since in most cases `ForyDefault` is identical to `Default`. But if this “optimization” creates friction for users—especially when integrating with existing codebases that already have a manual `Default`—it’s probably better to be conservative. So I’m fine with changing `ForyObject` to **not generate `impl Default` by default**, and instead gate it behind an explicit attribute (e.g. `#[fory(generate_default)]`). That keeps the derive non-invasive, avoids conflicts, and users who want the convenience can opt in. -- 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]
