This misses two fundamental differences between Go and "traditional" OO languages. (But for "traditional" read "recent, mostly C-derived".)
-
-
Show this thread
-
The first is that it's not only structs: Any concrete type can have methods: ints, bools, slices, even funcs: https://golang.org/pkg/net/http/#HandlerFunc …
Show this thread -
But the more important idea is the separation of concept: data and behavior are two distinct concepts in Go, not conflated into a single notion of "class".
Show this thread -
That is the insight (which goes all the way back to Smalltalk) on which the OO type system, including the interface model, is built.
Show this thread -
Stopping at "struct == class" misses much of what makes Go work.
Show this thread
End of conversation
New conversation -
-
-
I came from a C background and never "got" C++. Once I saw struct I felt at home. I call Go a "Type Oriented" language.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
If someone with very little programming background wanted to begin learning Go, which book would you recommend? i.e. is there a "K&R"-like tome for Go? Thank you.
-
Yep, here's the K&D version that I've read and think is fantastic to learn Go -http://a.co/25ivnNX
- End of conversation
New conversation -
-
-
Whereas anyone coming from Perl sees methods on arbitrary types and feels right at home.

- 2 more replies
New conversation -
-
-
As a C++ developer (mostly), that would actually motivate me to look further :)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Whenever I look at Go, with my Java background, I miss a decent build system with solid package management. Dependency vendoring is just not gonna cut it. See
@rustlang. The interface system is perfectly fine, thanks for asking :-) - 1 more reply
New conversation -
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
In my experience, modern C++ is more concerned with struct than class anyway, since style tends more towards functional programming.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The biggest thing was how interfaces are done.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
they also find “*” and “&” ,then crazy..
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I came from C and Java, looked at Go, liked it and then came back to C and Java. :-) It's hard to beat the elegance of C.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.