The GoalButton is created when all three parts are put together: the model (data), the update (how the data changes) and the view (how the data is displayed).
It is as smart as it can be BUT, in order for it to work, you need to place each of the three parts in their proper place in the composition.
Functional programming works best when you have a small set of data types and a huge array of operations that you can do on these data types. You can compose those operations easily and get quickly new operations.
Object oriented programming works best when you have a small set of operations but a large variety of that types that you can combine and get new datatypes that conform to the same limited set of operations.
I found a wonderful description of this from Martin Odersky of Scala fame:
https://youtu.be/Dxzbwq45tUA?t=170Elm does not have enough facilities for Object Oriented programming in order to be used as a drop in replacement. One needs to learn the Elm Architecture way and use that instead.
There have been some heated discussion started by people with mainly OO background but, from what I could understand, Evan (Elm's creator) is not willing to just add some random approach to that set of functionality.
The Elm Architecture however, works out pretty nice once you get to understand it.
The `init`, `update`, `view` are kinda like the small set of operations from OOP and instead of composing the objects, you compose each of the three independently.
This provides a lot of clarity when you do the composition.
Of course, you pay a price... and that price is that if you want to try and experiment with switching implementations for a GUI component (something that OO is very good at) you might have to change the code in 5 places (Model definition, init, Msg definition, update and view) instead of one. :)