Just my personal usage/2¢:

1. An interface-value/The value of an interface
2. The dynamic value
3. The dynamic type
x. Concrete type, to me, is a static type that is not an interface type.
y. Concrete value, to me, might sometimes be used interchangeably with
dynamic value. Or it might refer to that plus any value of a concrete type.
I'd consider both interpretations technically incorrect (due to this
ambiguity), but usually clear enough from context.
z. The type descriptor is an internal struct used by gc and its runtime (it
is not the pointer stored in an interface, but the pointee of that
pointer). It is an implementation detail that should never interest you,
lest you work on the toolchain yourself.

I try to deliberately use the terminology from the spec to not get bogged
down into implementation details. It is a design decision of gc to use the
representation as pointer to value/pointer to type descriptor. An
implementation might just as well (e.g. GopherJS, x/tools/go/ssa/interp,
gomobile…) choose a different implementation that boxes all values, if it
makes sense for the platform. But no Go implementation may violate the
dynamic/static type distinction. That's spec'ed.

(there is one imprecision that I accept in my personal use, between "a
value of $type" and "the value of a variable with $type")

On Mon, Nov 27, 2017 at 9:13 AM, Stefan Nilsson <
trolleriprofess...@gmail.com> wrote:

> An interface value in Go consists of two parts: a concrete value and a
> type descriptor. What is the preferred terminology when talking about this?
>
> The language specification says "dynamic value" and "dynamic type".
> However, this doesn't seem to have caught on.  The term "concrete value"
> seems to be more common, and I've also seen "concrete type" in a few places.
>
> My question. How do you refer to the following three concepts (and why):
>
> 1. the value of an interface (both parts),
> 2. the concrete value,
> 3. the type descriptor.
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to