But you can do equally horrible inheritance-y things with embedded structs.
Yes, though it's non-idiomatic and in my experience, rare to encounter in the wild for anything you'd actually want to use.
That's right, embedded structs in Go are far less common than inheritance in Java though.
That’s composition, and it’s not really the same as inheritance
Yes, though it's non-idiomatic and in my experience, rare to encounter in the wild for anything you'd actually want to use.
That's right, embedded structs in Go are far less common than inheritance in Java though.
That’s composition, and it’s not really the same as inheritance