Hi all,
I'm making a binding of a C++ library for go, and I'm wondering why the
anonymous field inheritance isn't used in the go wrapper code.
I have found a piece of comment in the go backend of SWIG, saying:
// For each method defined in a base class but not defined in
> // this class, we need to define the method in this class. We
> // can't use anonymous field inheritance because it works
> // differently in Go and in C++.
I have also found this old topic:
https://groups.google.com/d/msg/golang-nuts/0YJJKHGSRMY/gR6I1-mbU2AJ
What I think about the "difference" is that the anonymous field is more
like a delegation. However I still don't get the point how the "difference"
takes effect. Could anyone give an explanation, or an example where the
anonymous field doesn't work?
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.