←back to thread

Why F#?

(batsov.com)
438 points bozhidar | 1 comments | | HN request time: 0.206s | source
Show context
amelius ◴[] No.43546218[source]
I have a few questions. Can it do GUIs well? How about mobile? And how does it compare to e.g. Scala?
replies(6): >>43546276 #>>43546358 #>>43546479 #>>43546584 #>>43546812 #>>43550529 #
1. dagw ◴[] No.43546479[source]
Can 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.