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

This post presents why object oriented programming is harder than it looks.

“I’m gonna return a pizza because I want a pizza

When of course, what one really wants is a pizza in a box. And the oven objection is also kind of funny. It leads to a “but computers are so fast, why can’t they build me a new oven for each pizza?”

People think they want real-world analogies, which they hope will make code easier to reuse and maintain when what they really want are deep modules with clean interfaces, for which object orientation is not necessary in the least.



> When of course, what one really wants is a pizza in a box

That's what Boxed<Pizza> is for, but this is more costly than a Pizza directly.




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

Search: