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

Display for vectors. #458

Open
quadrupleslap opened this issue May 24, 2018 · 2 comments
Open

Display for vectors. #458

quadrupleslap opened this issue May 24, 2018 · 2 comments

Comments

@quadrupleslap
Copy link

quadrupleslap commented May 24, 2018

Can I submit a pull request implementing Display on vectors where their type parameter is also Display? And if I can, should I use ⟨1, 0, 0⟩, [1, 0, 0] or (1, 0, 0) for the brackets?

@brendanzab
Copy link
Collaborator

Tricky thing about the Display impl is it can be pretty context-dependent. Sometimes it's better to make a custom wrapper struct (with its domain-specific impl of Display) that you only use when making other Display implementations.

We could however improve the debug output to make it look prettier? Would that help?

@quadrupleslap
Copy link
Author

How about modifying the "pretty" Debug output (the one with the # modifier)? Removing the class name from the default debug output might make debugging harder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants