I love seeing F# mentioned on Hacker News, but this article in particular is a bit dubious. Yes, you can use F# from C#, but it gets frustrating quickly.
Fortunately, almost anything you can do in C# can be done better in F# anyway, so there's really very little need to use C# at all once you take the plunge into functional programming.
I agree - I guess this article is more about a (very) gradual way to adopt F# into an existing C# code base, rather than an inherently useful combination of C# and F#.
True, but for any serious integration the F# library should expose an API that's designed to be more idiomatic for C# callers. When I see `ListModule.OfSeq` being called from C#, I cringe a little.
Would you mind sharing some of the frustrations you have had using F# from C#? I haven't hit anything too hard yet but I also haven't worked on any large projects that are setup like that.
In regards to the C# vs F# issues. Have you tried using WPF or any desktop GUI frameworks from F#? If so how was the experience?
It's been a few years, but yes, I've implemented WPF apps in F# and found it quite doable. FsXaml was very helpful: https://fsprojects.github.io/FsXaml/
Reactive Programming I guess is the key to GUIs from F#/FP perspective. It is the modern way of doing things anyway but requires then a UI stack which is optimized for it.
C# is required for the UI programming, though. I don’t know any F# module, which interacts and manipulates UI elements. Yes, creating a web UI is possible, but not for the desktop.
I’d love if someone could point the way around (because until today, I’ve to combine both languages for desktop appt)
Fortunately, almost anything you can do in C# can be done better in F# anyway, so there's really very little need to use C# at all once you take the plunge into functional programming.