Ian, with all due respect, I beg to differ.

Let's look at that example posted 5 years back:

http://play.golang.org/p/Isoo0CcAvr

Yes, that is the proper behavior according to the rules, we have a FAQ 
entry, fine, but ... put simply: that makes no sense. Why? Because we, the 
users, expect the code to work the other way. That is a big surprise and we 
don't need the tool creating surprises for us, much to the contrary.

The internal layout Go uses to store an interface should not mess with the 
expected behavior. If interface is two separate fields, or just a pointer, 
or refers to a bitmap stored on the Moon, I don't care. I shouldn't care. 
The fact that today we must tell every new Go user this whole story is a 
shame. Go is meant to be easy, after all.

The behavior of a software of mine is not what my user expect? In my book 
that means I have a bug. Even with a very reasonable explanation, that 
remains a bug. I can spend hours explaining a strange behavior to my user. 
He will tell me: "Oh, yes. Now I got it, thanks. Fix that".

That reminds me of an old adage:
“If the map doesn't agree with the ground the map is wrong” 
I sincerely hope Go 2 will have it fixed.

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