-
@louthy Thank you for this amazing library, I'm using it on every project. I've also watched your standpoint on OO vs FP in your video https://www.youtube.com/watch?v=xwDhKV7CqAY, and I'm trying to follow here what I think I understand are your recommandations, so please don't hesitate to tell me where I'm not following them actually. I am using Prism (MVVM) architecture for all my WPF projects, though the complexity and boilerplate is becoming increasingly annoying (too many projects, interfaces, services, model wrappers, extremely repetitive tasks (for module+services creation/registration etc.), no straightforward serialization, VM part being overly complex, etc.) I spend way more time creating/organising files and folders "to make all of this work together" and navigating than actually coding. So I've decided to shift toward F#'s Elmish (Elmish.WPF more precisely) so I can focus more on what the code is actually doing (and because I feel more comfortable in F#), and i want your advice please: Context:
Questions: Thanks alot |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I don't use WPF, Elm, or Elmish and I've not really been near F# for a number of years now. So, I'm not sure I'm going to be able to give you the general advice you're looking for. A few points though:
You can make DUs with records, and its not too heavy on the syntax. The biggest issue is a effective completeness checking due to the types being 'open'. public abstract record Maybe<A>;
public record Just<A>(A Value) : Maybe<A>;
public record Nothing<A> : Maybe<A>; C# isn't as elegant as F# but I moved away from F# due to its relative neglect in Microsoft land. The tooling breaking constantly during the .NET Core migration period was enough for me to drop usage of it for good. Interop is always painful ( |
Beta Was this translation helpful? Give feedback.
I don't use WPF, Elm, or Elmish and I've not really been near F# for a number of years now. So, I'm not sure I'm going to be able to give you the general advice you're looking for.
A few points though:
Result
type. The docs cover the reasoningv5.0
of language-extYou can make DUs with records, and its not too heavy on the syntax. The biggest issue is a effective completeness checking due to …