by toastal · 3y ago · 0 comments
The idea of using FP for everything is about as sensible as the paradigm of using OOP for everything.
You don't have to solve paper-worthy academic puzzles to use OOP everywhere.
Using OOP everywhere has been done and probably continues to in some shops. There was a time in the 1990's when nobody was fired for using OOP everywhere.
In Common Lisp, absolutely every value you can create has a class: the class-of function is meaningful for any value. You can replace all the defun forms in a Common Lisp program with defgeneric and defmethod.
Compare to an OOP toolkit: call edit.focus() when the UI is first displayed and you're done. The reason you need a requester in Compose is because everything is FP and lacks identity, even though there actually is object identity buried deep inside, it's just hidden from you.
The FP model does have some benefits, but I think OP is right and we'll end up with a less radical mixed approach.
If something doesn't exist, maybe the reason is "it's a poor fit".
If you're going to assert that FP is a better fit for GUIs, you need some demonstration of that, especially since it's been decades since this meme started.