Re:After a year of using Node.js in production
by majewsky on Tuesday May 03, 2016 @04:18AM
(#11618823)
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{}.
Re:After a year of using Node.js in production
by spion on Tuesday May 03, 2016 @05:41PM
(#11624465)
I'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.
What I want is free-form records and structural types by default, nominal types only when necessary. I get more than half of that with TypeScript (it does lack nominal types but there are ways to get around that), and honestly its the half I prefer having.