Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to have a Generic <T> in an Event #902

Open
gbasso opened this issue Mar 22, 2019 · 0 comments
Open

Possibility to have a Generic <T> in an Event #902

gbasso opened this issue Mar 22, 2019 · 0 comments

Comments

@gbasso
Copy link

gbasso commented Mar 22, 2019

Is your feature request related to a problem? Please describe.
I cannot create event to store a parameter as T.

Describe the solution you'd like
The better solution for me, is to be able to create an event: event MyEvent<T>.

Describe alternatives you've considered
An alternative could be the creation of (generic) functions in event, this allows to create a function that can return a value as T. This allows to store the parameter as Object and avoids the problem defined in the following Additional context.

Additional context
As exchanged with @gallandarakhneorg : emit(new MyEvent<Float>) is easy to understand. The question is related to a clear definition into the receiving agent regarding different syntaxes, e.g. on MyEvent{}, on MyEvent<Float> {}, on MyEvent<? extends Number> {}, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants