-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Box BindingData output type separate from minor types #512
Box BindingData output type separate from minor types #512
Conversation
let map outMapA outMapCollection inMapA = | ||
mapA outMapA inMapA | ||
>> mapCollection outMapCollection | ||
|
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.
From #470 (comment):
I am not convinced that the changes in this file are needed yet. For example,
BindingData.OneWaySeq.boxMinorTypes
boxes'a
whileHelpers.createBinding
boxes'aCollection
. Can you change this PR so thataCollection
is boxed in each binding type'sboxMinorTypes
function?
-- @TysonMN
When we add the
't
type parameter toBindingData
, we are promoting types like'aCollection
from a "minor" type to a major type. Subsequently (to maintain backwards compatibility)Helpers.createBinding
boxes one of the major types ofBindingData
(ie,'t
) so that we don't break existing code.In one of the next PRs, we will be adding something like
Helpers.createBindingT
that doesn't box the major type, and then use it in the newStaticHelper
class.
-- @marner2
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.
This is less efficient and convincingly correct for you static code, but what about (just to start) you unbox 't
in the future PR instead of merging this PR?
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 think you mean just merging #511 first? I actually split them apart so you can merge that one first.
In the end though, we need this type passed all the way through, otherwise we'll be stuck putting type annotations on the view model properties.
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.
d25304e
to
c7f4e8e
Compare
c7f4e8e
to
5a6a5b3
Compare
470e2c1
to
83fd093
Compare
3873606
to
2518e54
Compare
2518e54
to
92225a9
Compare
92225a9
to
404c358
Compare
Closed, combined with #508 to actually implement the forward-facing feature in totality. |
COMBINED WITH #508
Conflicts with #506 because of the moved
createBinding
function.Box the output type T of
BindingData
separately fromboxMinorTypes
methods (andBinding.fs
helpers). Currently, all functions inBinding.fs
box it together, but this change allows for other constructs that don't box it.