r/functionalprogramming • u/jmhimara • Feb 16 '25
Question What is your favorite functional tool for GUI programming?
By "tool" I mean both the language and framework/library combination that enable you to create GUIs in a "functional" way (more or less). I found that many FP languages don't necessarily have great GUI libraries -- they're usually thin wrappers over some other library (e.g. GTK or electron). At least the ones I've tried.
Racket has a pretty decent GUI library, and while I enjoy writing lisp for short programs, it's not my favorite for big projects. F# is supposed to have a couple of decent GUI libraries but their not fully cross-platform -- well, Avalonia is supposed to be but I couldn't get it working on linux last time I tried. And the docs for the F# bindings seem incomplete.
I guess there is typescript+react+electron, if you consider that functional.
What technology have you used for your GUI programs that you've found enjoyable and relatively mature?
13
u/nrnrnr Feb 16 '25
No direct experience, but Elm looks promising.
4
u/gofl-zimbard-37 Feb 16 '25
Haskell has a nice looking GTK library, though I haven't used it. I I wanted a web UI I'd look hard at Elm. Many use Elixir/Phoenix for that as well, though I'm not fan of Elixir, being a pretty hard core Erlanger.
3
u/IllegalMigrant Feb 20 '25 edited Feb 20 '25
What is functional about GUI programming? It seems tailor-made for OOP.
3
u/[deleted] Mar 01 '25
F# is probably your best bet. There are a shit ton of options in the dot net ecosystem
3
u/Il_totore Feb 17 '25
I often use Scala(.JS) with Tyrian. It's an Elm-like architecture but less opiniated and more flexible while still enjoying the goods of Elm architecture.
3
u/yynii Feb 20 '25
PureScript + Halogen + Electron
0
u/[deleted] Feb 16 '25
[deleted] — view deleted comment