Teiva Harsanyi
Jun 2, 2023

--

No, inheritance simply doesn't exist in Go. Embedding `Animal` means promoting the fields and behaviors but conceptually, it remains composition, not inheritance.

--

--

Teiva Harsanyi
Teiva Harsanyi

Written by Teiva Harsanyi

Software Engineer @Google | The Coder Cafe newsletter (https://thecoder.cafe) | 📖 100 Go Mistakes author | 改善

No responses yet