Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-05 Thread Jan Mercl
I consider foo.bar and f.b to be of the same length, as in length of a list, 2 in this case, not length of a string. But I failed to be clear about it. On Sun, Nov 5, 2017, 17:38 Daniel Skinner wrote: > > I don't know when the shallowest depth can occur while not being on > shortest path > > I k

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-05 Thread Daniel Skinner
> I don't know when the shallowest depth can occur while not being on shortest path I know the feeling if we're generally talking about data structures and algorithms, but with regards to language spec, the only mental reference I have for "path" is for "import paths" of which the actual name is i

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-05 Thread Jan Mercl
I don't know when the shallowest depth can occur while not being on shortest path. Note that path was used in this discussion as meaning full, unpromoted path, ie. like if every embedded field of type T was declared T T instead. The actual selector expression is a prefix of this full path. On Sun

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-05 Thread Daniel Skinner
The spec uses "shallowest depth", not "shortest path", as I assume saying "path" would imply the given names in a selector expression determine ambiguity when they do not. "shallowest depth" makes the error more clear in my sample where if this: type Uniform GLUniform is changed to this: type U

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-03 Thread Daniel Skinner
Right, I've misunderstood why this error is thrown, as in what defines ambiguity. Text search of spec for "ambig" only yields results for composite literals and avoiding ambiguity in conversions while "shortest" yields no results and the only recollection of "shortest path wins" phrase I have is ba

Re: [go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-03 Thread Jan Mercl
On Fri, Nov 3, 2017 at 11:04 PM Daniel Skinner wrote: > https://play.golang.org/p/Y1UxMgNhWx > > I ran into this today but don't understand why the compiler isn't throwing an ambiguous reference error. Maybe I've misunderstood why this error is thrown the few times I've seen it. No ambiguity her

[go-nuts] Expected ambigiuous reference error, got a value instead

2017-11-03 Thread Daniel Skinner
https://play.golang.org/p/Y1UxMgNhWx I ran into this today but don't understand why the compiler isn't throwing an ambiguous reference error. Maybe I've misunderstood why this error is thrown the few times I've seen it. -- You received this message because you are subscribed to the Google Groups