-
Notifications
You must be signed in to change notification settings - Fork 11
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
Should unflatten
unwrap Fixed
values?
#37
Comments
Probably not, but our current semantics for edit: so it's standard practice (as far as anything can be called standard in an early-stage package like this) to define a helper function unpack = ParameterHandling.value ∘ unflatten that does what you're after. |
That makes sense. I partially ask because I want to make sure function value_flatten(args...)
v, unflatten = flatten(args...)
return v, value ∘ unflatten
end to save users the extra step? Or is this the wrong level to handle this at? |
No, that's an excellent idea (I wish I had thought to do this months ago). Would definitely be interested in a PR which adds that. |
* Add `value_flatten` as described in #37. * Remove heavy testing for `value_flatten` * Update README to use `value_flatten` * Formatting changes suggested by JuliaFormatter
I am finally getting around to #30. In doing so I noticed:
Since wrapping something in
Fixed
is only done for the sake of theflatten
/unflatten
machinery, I wonder if it would be better forunflatten
to return the unwrapped value of theFixed
number, since that's all end users will generally care about. Or I guess another question to ask is: Are there any situations where the end user would want theFixed
-wrapped value rather than just the value itself?The text was updated successfully, but these errors were encountered: