I don't agree with your analysis. The current "everything is an event" architecture causes even internal code to be implicitly coupled to execution order. It also makes it very hard to build composable plugins that reliably work in the presence of other plugins.
-
-
Consious Tradeoff
1 reply 0 retweets 0 likes -
However we do support before/after, etc now. So its getting _less unpredictable_
2 replies 0 retweets 0 likes -
Replying to @TheLarkInn @parceljs
I guess I'm just saying all abstractions are not created equal. One of the big insights of React is that passing functions as props and calling them is better than firing an event into the ether and hoping someone is listening.
3 replies 6 retweets 15 likes -
Among other benefits: - When you call a function wrong, you get errors right away that pause your debugger - Wrapping functions is easy to understand, and even higher order functions are easier to step through than evented patterns.
1 reply 2 retweets 8 likes -
Truth! So what's the tradeoff them Katz?
2 replies 0 retweets 2 likes -
-
I'm saying if you take the model you are talking about (a more functional composing approach), what are the trade-offs to that system as it grows?
1 reply 0 retweets 0 likes -
Replying to @TheLarkInn @parceljs
Ah! I think it just means that you should only "decouple through events" when you really need it. A lot of people perceive it to be an unvarnished good even when a parameter would do just fine.
1 reply 0 retweets 1 like -
So functions and parameters: - create coupling between components - but make it easier to see mistakes While events: - reduce coupling between components - but make it harder to see mistakes
1 reply 2 retweets 6 likes
The choice of which to use is based on how much you really need decoupling (and therefore are willing to pay for it with more opaque error cases)
-
-
It doesn't make sense for a React or Ember component to use events as much for communicating between components, because most of the time both sides share a contract and failing to pass something is a mistake.
2 replies 0 retweets 2 likes -
Sean Thomas Larkin (肖恩) Retweeted Chris Freeman
Absolutely. Also:https://twitter.com/15lettermax/status/944308662511767553 …
Sean Thomas Larkin (肖恩) added,
Chris Freeman @15lettermaxReplying to @TheLarkInn @wycats @parceljsI think@wycats is saying that the “tradeoff” isn’t readily apparent. i.e. Using the “everything is an event” approach costs you some determinism, but gains you _________? Without that blank filled in, the event-based approach isn’t a trade off, it’s strictly a drawback.0 replies 0 retweets 0 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.