-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add NeoSkeleton default length #5245
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how Long
is more qualified as a default than Medium
. Why do we need a default? Does this simplify the usage of the API?
The length is not being used for times and time zones, so this makes call sites a little easier to read. #5246 However, I'm now thinking I should just change the constructors to take an options bag where the length is one of the fields, like we do literally everywhere else, giving us more flexibility in the long run. |
Even if I make this change, I still need a default length, because I can't load data without the length. Alternatively, I can make the constructor return an error if the length is not set in the API. |
I guess another way around this is I can add another associated type to the trait system to suppress the need to pass a length into the constructor. |
Okay, I tried adding a type parameter for the options bag. The length ends up being used fairly deep in the stack, including during the formatting calls to select the correct pattern. (This avoids a |
Made obsolete by #5248 |
Any objections?