You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First time idea, F# can declare immutable type named record. The record usage is simple and safer than standard class type.
If it uses on a ViewModel, could update any property only construction time, but will be made clean and FP like manner.
So we can write update handler only returning new instance of record like MVU.
Pseudo code fragment (can't compile):
// It's a F# record typetypeSampleViewModel={// The handler would return a value `Async<SampleViewModel>`:
self.Clicked = CommandFactory.create (fun e:EventArgs ->async{return{ self.a, self.b self.c+1}}}
The record type contains getter property and (hidden?) setter property, and they have propchange capability. It code surface has only getter in F# (and C#?) syntax likes purely, but generated binary will have propchange impls. Command handler will transfer each props at returned from handler function. They will call propchanged callback if value is changed.
First time idea, F# can declare immutable type named record. The record usage is simple and safer than standard class type.
If it uses on a ViewModel, could update any property only construction time, but will be made clean and FP like manner.
So we can write update handler only returning new instance of record like MVU.
Pseudo code fragment (can't compile):
The record type contains getter property and (hidden?) setter property, and they have propchange capability. It code surface has only getter in F# (and C#?) syntax likes purely, but generated binary will have propchange impls.
Command
handler will transfer each props at returned from handler function. They will call propchanged callback if value is changed.@tatsuya-midorikawa told me it basic idea.
The text was updated successfully, but these errors were encountered: