3 ms·
I think allowing extensions on existing classes/structs can also solve this problem without having structural typing. ie the client can create a new interface
by laughingman2 7y ago
I think allowing extensions on existing classes/structs can also solve this problem without having structural typing.
ie the client can create a new interface and explicitly implement it for existing classes/structs.
I think Swift and rust allows this.