On Mon, Oct 10, 2016 at 8:39 AM, T L <tapir....@gmail.com> wrote:
> In the section of go spec:
> https://golang.org/ref/spec#Uniqueness_of_identifiers, it says:
>
> Two identifiers are different if they are spelled differently, or if they
> appear in different packages and are not exported. Otherwise, they are the
> same.
>
> So, two exported identifiers spelled same but in different packages are the
> same identifiers?
> Is my understanding right?

Yes.  But don't confuse the fact that the identifiers are the same
with whether the objects that the identifiers denote are the same.

The different handling of exported and unexported identifiers
particularly comes up with identifiers that denote struct fields or
methods, particularly when deciding how to handle embedded types and
promoted fields or methods.

Ian

-- 
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