comphead commented on PR #12822: URL: https://github.com/apache/datafusion/pull/12822#issuecomment-2402564649
> I find this intriguing and technically very interesting! I do have a few questions: > > * What are you goals with this? I am assuming cleaner looking/easier to create docs. If so I would wonder how it would help in cases were there is significant amounts of docs vs boilerplate such as in the [to_date](https://github.com/apache/datafusion/blob/3d347c99b32715690453add7fca1d76a3f8bbb01/datafusion/functions/src/datetime/to_date.rs#L84) udf. > * Can it be made to handle n arguments? > * Is it possible to generate rustdoc with this approach? > * I noticed that this approach creates a Documentation object on every call. It's obviously pretty minor but it would be nice if it could be static. > > To me in general while I find this quite interesting I wonder if the benefit outweighs the added complexity of the code generation. To be clear I am absolutely not against this approach - I just have a few concerns. Thanks @Omega359 The idea is to reuse your current approach but make it on the level of custom Rust attribute instead of having the documentation directly in the code. So the steps can look like: - Move Documentation structure to `pre-macros` crate - generate the code from macros instead of having it statically - we can have it static everything will be the same as its now, the only difference is the code will be created through the macros. I'm planning to play with to_date function as it covers also multiline comments as @alamb mentioned -- 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]
