2 ms·
I forgot about OCaml (since I normally associate it with the more sophisticated typing stuff). I don't know if I'd completely count Go since interfaces only app
by sizediterable 5y ago
I forgot about OCaml (since I normally associate it with the more sophisticated typing stuff). I don't know if I'd completely count Go since interfaces only apply to methods, not fields
- dgb23 5y agoDisclaimer: Not a regular Go user. I was thinking of how you can embed types in structs. You automatically dereference the fields and methods of the components directly from the outside.
- BobbyJo 5y agoYep, in go the inheritance (using the term loosely) structure can apply to interfaces (which specify groups of functions) and structs (which specify groups of data) and roughly does the same thing in both instances.