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
Most processors in the tmf package return Variant as their input and output type. Indeed, the event type of a Fork is determined by the output type of the source it is connected to: there can be a fork of integers, or a fork of strings, etc.
However, this means that type checking is disabled for these processors. So, one can connect a queue source of integers to a fork, and one of the outputs of that fork to the Negation processor, and this will not raise an exception, as the fork is "type-agnostic".
One possibility would be to create a Typable interface, which would allow a processor to be told what are its input and output types. The connect() method would check if one of the processors implements Typable, and if so, call its setType() method and give it the other processor's type.
Not sure if the benefit of a more precise runtime type checking is worth all this machinery (and the extra memory involved in each such processor just to remember types).
The text was updated successfully, but these errors were encountered:
Most processors in the tmf package return Variant as their input and output type. Indeed, the event type of a Fork is determined by the output type of the source it is connected to: there can be a fork of integers, or a fork of strings, etc.
However, this means that type checking is disabled for these processors. So, one can connect a queue source of integers to a fork, and one of the outputs of that fork to the Negation processor, and this will not raise an exception, as the fork is "type-agnostic".
One possibility would be to create a
Typable
interface, which would allow a processor to be told what are its input and output types. Theconnect()
method would check if one of the processors implementsTypable
, and if so, call itssetType()
method and give it the other processor's type.Not sure if the benefit of a more precise runtime type checking is worth all this machinery (and the extra memory involved in each such processor just to remember types).
The text was updated successfully, but these errors were encountered: