2 ms·
Most serious statically-typed languages have some sort of "anything" type where you can check the actual value type at runtime using some sort of reflection. Fo
by majewsky 11y ago
Most serious statically-typed languages have some sort of "anything" type where you can check the actual value type at runtime using some sort of reflection. For example, the direct Golang equivalent of a Javascript object is a map[string]interface{}.
- spion 11y agoI'm not looking for an `any` type, but for structural types: Go interfaces are already a basic form of that, although a bit too basic. And I hate to say it, but Go doesn't qualify as a serious statically typed language. No language without generics does.