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

The backward subject-verb semantics in the OO examples are typical anti-OOP straw men. It doesn't have to be Room.look() and Object.examine(), when it could simply be Player.look(Room), Player.examine(Object), Player.put(Meat, Basket), etc. Don't begin with a design pattern then write code around that poorly choosen pattern. Instead write your core logic expressions first then it becomes obvious what the structure of each object ought to be.




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

Search: