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
Is your feature request related to a problem? Please describe.
Currently, there are a lot of interfaces and functions (e.g., side effects and channels) accepting or returning interface{}. I believe that with generics, it is possible to provide Typed equivalents for these interfaces, enhancing type safety.
Describe the solution you'd like
For instance, a side effect could take a typed function f and return f() directly instead of some converter.EncodedValue
We have discussed how generics can make the Go SDK API more type safe. We plan to provide a sample showing how the Go SDK could be wrapped using generics, but we do not plan to add it to the SDK at this time. If the sample receives sufficient interest me may consider graduating it into the SDK in some form, but that is TBD.
Quinn-With-Two-Ns
changed the title
Typed equivalents for workflow.* functions/interfaces
Add Sample for Typed equivalents for workflow.* functions/interfaces using generics
Oct 30, 2023
Is your feature request related to a problem? Please describe.
Currently, there are a lot of interfaces and functions (e.g., side effects and channels) accepting or returning
interface{}
. I believe that with generics, it is possible to provideTyped
equivalents for these interfaces, enhancing type safety.Describe the solution you'd like
For instance, a side effect could take a typed function
f
and returnf()
directly instead of someconverter.EncodedValue
Describe alternatives you've considered
Implement these typed interfaces in my own code.
The text was updated successfully, but these errors were encountered: