3 ms·
Runtime safe and statically type checked are two fundamentally different things is my point. Interfaces in most typed languages are static concepts, though ther
by nixpulvis 5y ago
Runtime safe and statically type checked are two fundamentally different things is my point. Interfaces in most typed languages are static concepts, though there are always exceptions.
- strbean 5y agoYou can think of interface{} like Object in Java. Interfaces in go are simply saying "this thing satifies these properties". interface{} is an interface that anything can satisfy.
- nixpulvis 5y agoI will continue to think of interface{} as Any in Rust.
- ibraheemdev 5y ago`interface{}` used as a type is almost exactly `Box<dyn Any>`.