OOP/FP #47
Replies: 2 comments 1 reply
-
Thanks for that. I appreciate you drilling through that - I don't necessarily think it's bad per se. Given what you get from Avalonia it's a cognitive burden I'm willing to make part of my toolkit. I just took the toggle button from the sample app (remember AutoUpdate?) and converted it into a "freeze" button for these visuals that have a quick rolling update. I thought you'd get a kick out of it - where member this.IsFreezeChecked
with get () = this.Bind (local, _.IsFreezeChecked)
and set value = local.Dispatch (SetIsFreezeChecked value) Screen.Recording.2024-01-11.at.5.15.22.PM.mov |
Beta Was this translation helpful? Give feedback.
-
I'm curious if you even get something like a "DynamicResource" if you're not wiring things up "on the fly" ala OOP... I spend some much time relishing in F#'s "lay the pipelines first" bent that I haven't really asked the question. When it comes to "laying up to the mutable world" of UX I kinda want the flexibility. (which I also get with WildernessLabs Meadow - though I have to use mutables to reach many of them from my code) |
Beta Was this translation helpful? Give feedback.
-
@houstonhaynes
I saw you tweet the other day about how context switching between OOP and FP is difficult, especially WRT using this library.
I've noticed the same thing lately as I have some mixed solutions with both C# and F#. Switching back and forth between the two paradigms often does incur a mental "penalty" that I don't have when working fully in one realm or the other.
This library in particular straddles both sides of the fence since almost every view has a view model (OOP) and an Elmish loop (FP) -- usually in the same file. I wonder if I have created an unholy alliance. 😅
OTOH, I suppose this is a big part of what makes F# "pragmatic" is the ability to play nicely with the C# ecosystem, which is exactly what this library aims to do.
Beta Was this translation helpful? Give feedback.
All reactions