You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package event provides type Feed for subscription handling. A Feed is always constrained to a single type, and this restriction is enforced at runtime using reflection. With the introduction of generics in Go 1.18, it is now possible to declare and enforce the element type of Feed at compile time.
To avoid breaking downstream code, I suggest we add a new type FeedOf[T any] to package event. The behavior of this feed implementation would be exactly the same as the current one.
The text was updated successfully, but these errors were encountered:
Note for potential contributors: this issue is not actionable immediately since we will wait for a while to fully adopt Go 1.18 and generics. Please do not submit PRs for this issue right now.
Package event provides type
Feed
for subscription handling. AFeed
is always constrained to a single type, and this restriction is enforced at runtime using reflection. With the introduction of generics in Go 1.18, it is now possible to declare and enforce the element type ofFeed
at compile time.To avoid breaking downstream code, I suggest we add a new type
FeedOf[T any]
to package event. The behavior of this feed implementation would be exactly the same as the current one.The text was updated successfully, but these errors were encountered: