What would people think of using the term ‘state’ instead of ‘model’? I find that usually when I’m explaining the Elm Architecture to someone, I end up saying “the model represents the state of your application” and I don’t seem to be alone:
- Elm in Action has an entire section titled “Representing Application State with a Model”
- Even the official Elm guide describes it as “Model — the state of your application”
So why not just use the word ‘state’ everywhere? To me it seems more descriptive and plain-language, without too many obvious downsides. And as far as I can tell it could be done gradually, without breaking changes to the core language or libraries.
elm/browser currently uses
model as the name for the applicable type variable, but that could be changed in a patch release if desired - the word ‘model’ doesn’t appear in any record fields etc. where it would be a breaking change (they’re all
init instead, which is fine).
Thoughts? Are there benefits of using ‘model’ that I’m missing, or reasons that making the switch would be harder than it looks? (This seems like the sort of thing that would have come up before, but if so I can’t remember it.)