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

I think embedding structs would be way more useful if a) there would be properties on interfaces and b) there would be generic methods available.

As long as these two aren't there, embedding structs is literally identical to dispatching methods, and can't be used for anything else due to lack of state management through it. You have to manage the states externally anyways from a memory ownership perspective.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: