-
Notifications
You must be signed in to change notification settings - Fork 117
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
Reverse the generic parameter order to make the type shorter #136
Comments
Can you not simply use |
I am currently working to a 1.0 release, and am already intending to cause API breakage in the update. I believe you have a point, and I will give switching them a try and see how I feel about it. Honestly, the ordering was chosen arbitrarily, and I've just gotten accustomed to it, but I don't have any actual rationale for or against However, we have these examples in the standard library:
|
Okay I've gone through and made the change locally. It was nightmarish to accomplish but now that I did, I am forced to admit it's better. It's more consistent with common bit-slice init patterns (like This change will likely be present in 1.0. I'll leave this issue open until then in case arguments against doing so (other than "this is a major breaking change") emerge, but I will lock this issue once I publish 1.0, because I'm linking to it in the documentation and I don't want to risk swarming your notifications. Thank you for the issue; I apologize for my radio silence. |
Wrong button. This will close when 1.0 publishes. |
which it did now |
I know this is trivial and will break every dependent code base, but if there were to be a "new edition", please consider to put the storage class parameter before the bit order parameter in types like
BitSlice
,BitArray
andBitVec
. In most cases, the bit order parameter is rared changed, and people would use either Lsb0 or LocalBits everywhere, whereas people change the bit storage parameter in different places all the time for optimal memory usage/access and the defaultusize
is unnecessarily big/inflexible for many applications.By switching the order around, users would only need to write
BitSlice<u8>
instead ofBitSlice<Lsb0, u8>
.The text was updated successfully, but these errors were encountered: