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

no inheritance but there are interfaces to be able to provide alternate implementations. Similar to traits in Rust. If it quacks like a duck, has feathers like a duck, swims like a duck…

Go just assumes if you satisfy the interface, you’re good.



maybe, it is just some effort for someone who coded in classic OO for last 20 years to wrap head around this new concept fast and judge if it will satisfy all/most use cases.




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

Search: