Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug printing convenience macro #47

Open
Tehforsch opened this issue Dec 30, 2023 · 0 comments
Open

Debug printing convenience macro #47

Tehforsch opened this issue Dec 30, 2023 · 0 comments
Labels
enhancement New feature or request ergonomics Library usage ergonomics

Comments

@Tehforsch
Copy link
Owner

It could be nice having a dbg-like macro that can quickly print a quantity in the desired unit with a call like
qdbg!(vel -> m/s)
which would effectively expand to something like
println!("{} m/s", vel.in_meters_per_second());

Should be easy to implement, if one defines the functional macro from within the procedural macro (which sounds scary, but probably isnt)

@Tehforsch Tehforsch added the enhancement New feature or request label Dec 30, 2023
@Tehforsch Tehforsch added the ergonomics Library usage ergonomics label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ergonomics Library usage ergonomics
Projects
None yet
Development

No branches or pull requests

1 participant