On Mon, Nov 27, 2017 at 3:02 PM, Stefan Nilsson <
trolleriprofess...@gmail.com> wrote:

> Sure, using a type descriptor to implement the dynamic type is an
> implementation detail. but the fact that an interface value consists of a
> concrete value and a dynamic type is part of the spec. I find it
> unfortunate that there is no common agreement on the terminology. That's
> why I'm asking.
>

"concrete" is mentioned once in the spec:

"Variables of interface type also have a distinct dynamic type, which is
the concrete type of the value assigned to the variable at run time"

I don't think this warrants deriving the term "concrete type" as canon (on
the contrary). TBQH, I'm also not quite sure there is that much of an
issue. I've never ran into any real issues, that I noticed.

You asked what terms we are using for several concepts and why. And my
answer is: I use terms like "(static) type", "dynamic type" and "dynamic
value" as they are defined in the spec, because they are defined that way
in the spec.
I use the term "concrete type", when referring to a non-interface type,
because it's a useful concept to talk about and it is how I usually see
that term used.
And I use the term "type descriptor" to refer to the implementation detail
of gc's generated struct describing the type - because it seems very
descriptive (pun intended) :)
Personally, I rarely, if ever, see an inconsistency from this usage with
what everyone else is saying.

If you are observing a disconnect or disagreement, maybe what's needed is
some better documentation/explanation/publication of these terms? Because
they do seem pretty unambiguous, to me.


>
> On Monday, November 27, 2017 at 2:58:21 PM UTC+1, Jan Mercl wrote:
>>
>> On Mon, Nov 27, 2017 at 2:43 PM Stefan Nilsson <trollerip...@gmail.com>
>> wrote:
>>
>> Having a dynamic type does not imply having a/any type descriptor
>> included in the value of an interface variable. That's why it's an
>> implementation detail.
>>
>>
>>
>> --
>>
>> -j
>>
> --
> 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