3 ms·
This article almost seems like a falseflag, in how it cheerfully provides a benediction for an ugly hack to deal with controversial inadequacies of the Go type
by Blikkentrekker 5y ago
This article almost seems like a falseflag, in how it cheerfully provides a benediction for an ugly hack to deal with controversial inadequacies of the Go type system.
- kevincox 5y agoI don't see interface{} as a deficiency in the type system. Just about every type system has a method for storing "any" value such that it can then be upcast at runtime. The problem in Go isn't with interface{} but that the simple type system can't handle common use cases so you end up needing it use interface{} much more often that you would need to in other languages. Basically interface{} is useful when you truly need it. But it is often used to workaround deficiencies in the type system.