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

None of those things are required for a class. I'll admit they are all useful at time, but all are abused.


It largely depends on the definition of "class" you're using. You'll raise some eyebrows calling structs that can't support implementation inheritance "classes".

You can also have implement different associated functions based on properties of generic arguments, which is quite different in design from just attaching methods to a struct.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: