FAQ

Conceptually: not structs -- any type.
right! got it, thanks :-)
not references -- copies.
copies? I don't understand - when would they get copied?

I need to tinker more with interfaces in the playground and get a handle on
this...



On Fri, Dec 27, 2013 at 11:53 AM, chris dollin wrote:
On 27 December 2013 16:49, Rasmus Schultz wrote:

If the struct (or whatever) will fit in the pointer-sized space in the
interface value then that's what's in there.

I see - but that's an under-the-hood optimization, right?
Yes, true. (An IMPORTANT one.)

conceptually, I can think of interfaces as being references to structs?
Conceptually: not structs -- any type. not references -- copies.

and what does "WOSSNAME" mean?
Thingy.

Chris

--
Chris "what's-his-name" Dollin
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2022 Grokbase