News for hackers. Stuff that matters.
Re:Gccgo in GCC 4.7.1 by jules on Wednesday July 11, 2012 @10:42PM (#4232669)
How is that even possible? Surely there must be a type tag associated with each object if you can dispatch on it, just like in other languages.
Re:Gccgo in GCC 4.7.1 by psykotic on Thursday July 12, 2012 @12:16AM (#4232980)
A variable of an interface type is a pair consisting of a type descriptor and a concrete value. It is only when a concrete value of a statically known type is passed to something expecting an interface type that such a type tagged value is constructed.
Re:Gccgo in GCC 4.7.1 by enneff on Thursday July 12, 2012 @09:20AM (#4234329)
For interface values there is a type associated with each value.

For normal values you don't need it, because Go is statically typed. The compiler knows where the method is.