Subs or Substitutions?
See original GitHub issueI really like the API, a complete copy of ElmArchitecture in JavaScript. My only peeve is subs
. I think it would be better to use the term subscriptions
like Elm and Choo. I remember the first time I looked at the counter example and saw the sub function in the update method. I immediately assumed it was a singular instance of subs, whatever they were. Then when I saw the subs in actions I was thinking, hmmm… substitutions?, subtractions? subordinations? subscripts? or maybe he wants to give us all foot long subs!!! Yay! I’ll have two please. OK, I know you used subs
to save a few letters typing, but going forward if you want this project to gain traction it would be better to use the more explicit term subscriptions
to save people the mental work of constantly translating subs to subscriptions in our heads. Even in your README
you describe subs
as: Subscriptions are functions that run once when the DOM is ready. Use a subscription to register global events, like mouse or keyboard listeners. I’m suspecting you probably just lobbed off the tail end of pubsub for the term. My point is explicit terms are always better than implicit terms in API design. It’s not like people would have to type the term a thousand times. It’s just once. Then when you scan the page and see subscriptions
it would be immediately clear what you are looking at, even if you were not familiar with this API.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:9 (7 by maintainers)
Good point.
What do you folks think? @danigb @itrelease @maraisr @tzellman @evgenykochetkov @terkelg
I’m 💯 with the idea.
I was thinking the same thing.
subscriptions
is better if you want shorter namesubscribes
is better thansubs
too.