Hi,
I am experimenting with VL Interface patch type as I could sometimes use something akin to subtypes in some patches. For instance if I wanted to implement something like the Strategy pattern. Sure there’s also the options of using Delegates but when I want to keep an internal state or have multiple methods, using interfaces should be justifiable.
At first I couldn’t figure out how to force types on generic node inputs/outputs to the Interface class instead of the implementations.
For some it might be obvious but it turns out all you have to do is stick an IO box typed to the Interface to give the compiler a hint. Then you can use the implementing classes as expected.
Wonder if there is a way to cast the object back to one of the implementing classes, but without a fail handling structure it’s just calling for trouble :)