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 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.1 reply 0 retweets 2 likes -
Strictly a drawback? I would say gains are: - Extreme Loose Coupling (especially within, synchronization etc) - Easy to pivot, add new features, remove features. - Super flexible as event can be anything - Highly Distributed Theres also tight coupling as well.
2 replies 0 retweets 1 like -
It's not so easy to add new features because the exact details of the timing of the events and when the consumers run become undocumented "implicit" APIs. Loose coupling is quite often in conflict with API evolution if there's a lot of implicit API surface.
1 reply 1 retweet 6 likes -
It's the implicit piece which is hard. But changes we _just_ made now make all of the api surface explicit. Now you can only hook into "taps" (aka events) that exist, etc. The best part is finding out through "ts-check" event string that aren't even used anymore.
pic.twitter.com/nHBOOlPJrV
3 replies 1 retweet 2 likes
But yeah, TS really helps a lot.
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.