Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Go achieves inheritance through anonymous fields. Anonymous fields are multiple inheritance in all but name,

Anonymous fields in Go are syntactic sugar for delegation. Because anonymous fields do not create a "subtype" relationship between types, anonymous fields are inheritance.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: