-
Notifications
You must be signed in to change notification settings - Fork 321
Strongly typed Axis
arguments
#91
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
Comments
Yes that's really a nice feature to have, imo it improves readability and prevents some mistakes. |
Yes. Using generics is unfortunate in one way, since it makes the interface seem more complicated. But it also enables static checking. I've tested this out at some point, and I think it works. |
Oh I think it requires O(n²) impl blocks where n is the number of dimensions supported though (We have up to 12-tuples). |
Maybe macros can help on that point, but I wouldn't know, I've not written many macros yet. |
Fixed by #97 |
We could have strongly typed
Axis
arguments (instead of current usize).It even allows mixing dynamically bounds checked axis numbers and statically checked ones:
.subview(Axis(0), 1)
vs..subview(Axis0, 1)
would both be possible at the same time.The text was updated successfully, but these errors were encountered: