Hacker News new | past | comments | ask | show | jobs | submit login

Almost every single case of embedding I've encountered was buggy in some way.

Explicit composition is much more reliable.




If someone autogenerates one way or another all the delgation, then that's just as buggy as embedding. The presence of all the explicit composition in the codebase doesn't mean that anyone actually sat down and thought about it all.


Autogenerating delegation is bad for the same reason. Having to explicitly delegate in every single case forces you to think about it.

Alternatively, it forces you to use the type system to make a better abstraction.


> forces you to think about it

forcing people to type something never forces them to think about it.




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

Search: