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
With the motivation of keeping the typing infrastructure out of the way of new users I have been considering relaxing the type-checking at construction time (i.e. lazy fields) so that base classes can be passed to sub-classed type fields. This will avoid need to add cast statements between loosely-typed tasks and tightly-typed tasks. Stricter type-checking/coercing can still be performed at runtime.
For example, if B is a subclass of A, then currently you can connect a B-typed output into a A-typed input but if you wanted to connect A-typed to B-typed you would need to cast it to B first. While this aligns with how traditional type-checking is done, we might want to be a bit more flexible so you could connect generic File type fields to Nifti fields for example. If both upstream and downstream nodes use to specific formats that don't match, e.g. MrtrixImage -> Nifti then we would still raise an error.
It would somewhat reduce the effectiveness of the type-checking, but would probably avoid any (false-positive) cases where the type-checking could be annoying
The text was updated successfully, but these errors were encountered:
With the motivation of keeping the typing infrastructure out of the way of new users I have been considering relaxing the type-checking at construction time (i.e. lazy fields) so that base classes can be passed to sub-classed type fields. This will avoid need to add cast statements between loosely-typed tasks and tightly-typed tasks. Stricter type-checking/coercing can still be performed at runtime.
For example, if B is a subclass of A, then currently you can connect a B-typed output into a A-typed input but if you wanted to connect A-typed to B-typed you would need to cast it to B first. While this aligns with how traditional type-checking is done, we might want to be a bit more flexible so you could connect generic File type fields to Nifti fields for example. If both upstream and downstream nodes use to specific formats that don't match, e.g. MrtrixImage -> Nifti then we would still raise an error.
It would somewhat reduce the effectiveness of the type-checking, but would probably avoid any (false-positive) cases where the type-checking could be annoying
The text was updated successfully, but these errors were encountered: