On Fri, Mar 29, 2019 at 8:27 PM <jlforr...@berkeley.edu> wrote:

> However, in the case that I illustrated there is no such problem. I would
have thought that the
> language would allow this construct with any expression on the right
side, as long as it only has one
> map access.

Consider

        type v struct{
                a T
                b map[U]V
        }
        var m map[W]v{}

        ...

        x, ok := m.b

Which map should the ok value reflect under the changed rules? And
disambiguation it with the "only one map access" rule, reading the code no
more hints about what ok belongs to without prior knowledge of what type of
m.b is.


-- 

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

Reply via email to