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

Great answer, thanks for explaining this! I'm curious about how much this approach differs from the one pursued by Javascript, which seems pretty similar to me.


Javascript lacks the "packages" part of the mix, it uses Prototypal inheritance rather than Class based inheritance.

If you squint you can view prototypal inheritance as class-based-inheritance-where-everything-is-a-singleton ... but you really need some alcohol to deal with the headache you get from squinting that much.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: