3 ms·
I have a few questions. Can it do GUIs well? How about mobile? And how does it compare to e.g. Scala?
by amelius 2y ago
I have a few questions. Can it do GUIs well? How about mobile? And how does it compare to e.g. Scala?
- munchler 2y agoIt can do GUIs well, although it takes some finesse to manage user state in an immutable-first language. Check out Fable for building web apps: https://fable.io/ https://fable.io/ I don't have much experience with Scala, but I think the two languages are pretty comparable in their respective ecosystems. The biggest difference I'm aware of is that Scala has typeclasses and F# does not.
- int_19h 2y agoF# is not really that strong on immutability, though. Sure, variables and struct fields are immutable by default, but making them mutable is one keyword away. Similarly with classes - declaring readonly properties is more concise, but when you need a read/write one, it's readily available.
- pjc50 2y agoBecause it's a CLR language, it has access to all the same technologies as C#. That is, all the Microsoft native ones plus cross-platform with Avalonia. https://fsharp.org/use/desktop-apps/ https://fsharp.org/use/desktop-apps/
- dagw 2y agoCan it do GUIs well? I don't know if I would say 'well'. For simple GUIs it's OK but, for non-trivial GUIs I would use the approach to write the GUI frontend code in C# and have it call the F# 'backend'. If for no other reason than that the support and documentation for doing GUIs in C# is much better. How about mobile? Never tried, but I'm guessing more or less the same story as above. I would probably start by looking into .Net MAUI for that. And how does it compare to e.g. Scala? The biggest difference is that Scala is a much bigger and more of a multi-paradigm language. F# feels smaller and more focused and on its ML roots and functional programming. Not saying that Scala is less 'functional' than F#, but Scala supports you writing your code in a much more OOP way if you want. Yes you can (and sometimes have to) do OOP in F#, but it doesn't feel natural.
- ivm 2y ago.NET for iOS and Android is very robust, I’ve been developing with it since 2018. Just avoid using MAUI for interfaces because it's still quite unfinished after the rewrite from Xamarin.Forms.
- jcmontx 2y agoSprinkle some HTMX next to your favorite template engine and you're g2g
- Akronymus 2y agoWhich is what I am doing with my personal website for the most part. Elmish for the subpages where a lot of interactivity is actually needed. Otherwise just using Feliz.ViewEngine with htmx purely for enhancements
- Lanayx 2y agoFor web UI we have Fable and it's integration with well-known js frameworks, also WebSharper (although it's less well-known) and Bolero (on top of Blazor) For mobile we have FuncUI (on top of Avalonia) and Fabulous (on top of Avalonia, Xamarin and Maui). Most of these frameworks use Elm architecture, but some do not. For example I use Oxpecker.Solid which has reactive architecture. Can't help with Scala comparison, but at least DeepSeek V3 prefers F# for UI https://whatisbetter.ai/result/F%23-vs-Scala-9eaede00c7e448568f6756095849ae2b https://whatisbetter.ai/result/F%23-vs-Scala-9eaede00c7e4485...