Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename model to state. #173

Closed
jorgebucaran opened this issue Mar 30, 2017 · 24 comments
Closed

Rename model to state. #173

jorgebucaran opened this issue Mar 30, 2017 · 24 comments
Labels
enhancement New feature or request
Milestone

Comments

@jorgebucaran
Copy link
Owner

Please 馃憤 or 馃憥.

@jorgebucaran jorgebucaran added enhancement New feature or request FUTURE labels Mar 30, 2017
@nichoth
Copy link

nichoth commented Mar 30, 2017

Those terms make no difference to me, so no need to change it.

@selfup
Copy link
Contributor

selfup commented Mar 30, 2017

Since we changed updates to actions, following the redux/Vuex semantics would be nice. Renaming to state makes sense 馃憤

@arturi
Copy link

arturi commented Mar 30, 2017

Model is something from MVC frameworks to me, and I still get confused for a second when I stumble upon it in Hyperapp. Choo, Yo-yo, React/Preact all call it state, so I鈥檓 in favor of renaming for consistency.

@FlorianWendelborn
Copy link

FlorianWendelborn commented Mar 30, 2017

@jbucaran I'm in favor of state since a friend of mine was confused about the difference between model and state and this terminology is one of the things he considers confusing about hyperapp.

Of course that's anecdotal, but I don't care.

@jorgebucaran
Copy link
Owner Author

I don't mind either, and the reason I chose model was TEA, but I also agree with some people finding model confusing since the most widespread term is state anyway.

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Mar 31, 2017

Hi @SkaterDad @nichoth @cdeutmeyer!

If you have a minute, can you explain why you dislike / disapprove this notion?

@leeoniya
Copy link

leeoniya commented Mar 31, 2017

i upvoted state, but if you intend to stay close to TEA, then it may be worth sticking to its terminology [1].

[1] https://guide.elm-lang.org/architecture/

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Mar 31, 2017

@leeoniya You're right, but TEA also has the word update which we don't use anymore.

@dodekeract Does your friend find hyperapp confusing just because of the world model? Seems an extreme position to take just because of a word. Just curious.

@FlorianWendelborn
Copy link

@jbucaran No, mainly because of the differences to react/redux. He's currently trying to learn how to create SPAs and react/redux is the stuff he's currently attempting to learn.

@jorgebucaran
Copy link
Owner Author

Gotcha. Good choice anyway. Reminds me of this.

@cdeutmeyer
Copy link

I'm really fine with it either way.. I just like sticking as close as possible to Elm terminology.

@danigb
Copy link
Contributor

danigb commented Mar 31, 2017

In my mind "model" is more related to MVC and other OOP paradigms, and "state" is more connected to functional programming (where state management is made explicit instead of implicit). Mixed with the previous departure from the Elm architecture nomenclature, I'd go with "state".

@leeoniya
Copy link

my reasoning was same as @danigb

@FlorianWendelborn
Copy link

@jbucaran The community is mostly in favor of this change. Can we implement it?

Also something somewhat related: when we link to code pens we should make sure they don't use hyperapp@latest since hyperapp is currently not stable enough for that. We should always link to hyperapp@0.8.x or similar.

@jorgebucaran
Copy link
Owner Author

@dodekeract You are right, but latest refers to the published npm version, which is working fine AFIK.

@jorgebucaran
Copy link
Owner Author

Can we implement it?

Yes, let's do so after #172 is merged please.

@FlorianWendelborn
Copy link

FlorianWendelborn commented Apr 1, 2017

@jbucaran Yes, it's working fine. right now. This leads to all hyperapp codepens breaking as soon as we publish breaking changes. This is especially relevant for forked codepens that inherit from our examples.

@jorgebucaran
Copy link
Owner Author

jorgebucaran commented Apr 1, 2017

@dodekeract Fortunately CodePens URLs don't change, so I just need to update the code. JSFiddle URLs do change, so I'll have to rewire everything or ditching JSFiddle.

@FlorianWendelborn
Copy link

FlorianWendelborn commented Apr 1, 2017

@jbucaran You don't see the problem. People fork our examples. This means they inherit this time bomb that destroys their codepens as soon as we introduce another breaking change.

@jorgebucaran
Copy link
Owner Author

@dodekeract Ah, you're right... 馃槬

@jorgebucaran jorgebucaran added this to the 0.8.0 milestone Apr 1, 2017
@selfup
Copy link
Contributor

selfup commented Apr 1, 2017

If the codepens use specific versions (as they should) then everything will be fine 馃槃

jorgebucaran pushed a commit that referenced this issue Apr 3, 2017
jorgebucaran pushed a commit that referenced this issue Apr 3, 2017
jorgebucaran pushed a commit that referenced this issue Apr 4, 2017
jorgebucaran pushed a commit that referenced this issue Apr 4, 2017
jorgebucaran pushed a commit that referenced this issue Apr 9, 2017
jorgebucaran pushed a commit that referenced this issue Apr 9, 2017
jorgebucaran pushed a commit that referenced this issue Apr 9, 2017
jorgebucaran pushed a commit that referenced this issue Apr 9, 2017
jorgebucaran pushed a commit that referenced this issue Apr 11, 2017
jorgebucaran pushed a commit that referenced this issue Apr 12, 2017
@AG-Systems
Copy link

Why not just offer both versions?

@jorgebucaran
Copy link
Owner Author

@AG-Systems Do you mean both model and state?

I guess we could, but the idea is to come up with a clear API that is easy to teach and learn, also that would waste some bytes for no good reason.

Check out #177, we're renaming model to state in 0.8.0.

@AG-Systems
Copy link

Yes @jbucaran
Oh okay sweet

jorgebucaran pushed a commit that referenced this issue Apr 12, 2017
jorgebucaran pushed a commit that referenced this issue Apr 12, 2017
jorgebucaran pushed a commit that referenced this issue Apr 13, 2017
jorgebucaran pushed a commit that referenced this issue Apr 13, 2017
jorgebucaran pushed a commit that referenced this issue Apr 13, 2017
jorgebucaran added a commit that referenced this issue Jan 7, 2018
jorgebucaran added a commit that referenced this issue Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants