4 ms·
Go has a lot of pain points but the one positive thing it has over other languages is how it handles interfaces. The whole point is that the caller can make ne
by dagss 8y ago
Go has a lot of pain points but the one positive thing it has over other languages is how it handles interfaces.
The whole point is that the caller can make new interfaces to fit existing structs in other libraries.
- pjmlp 8y agoNothing new, ML derived languages also allow for it.
- k__ 8y agoTypeScript too.
- deleted 8y ago[deleted]
- jonathankoren 8y agoActually, two of the pain points of Go is not knowing exactly what interfaces a class implements, and finding out that you misimplemented an interface but not discover this static analysis until you get a runtime type check failure. All this pain for what boils down to not having to make a wrapper. Sure wrappers are dumb, but pushing a static analysis out to a run time error dumber, especially since implementing interfaces is a lot more common than wrapping 3rd party structs.
- stouset 8y agoImplicit implementation of interfaces is a disjoint concept from allowing third-party users to implement new interfaces on first-party or second-party structs. The latter is wonderful, and other languages support this without needing to resort to the former.