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

How's that any different to a 'classical OOP' approach?



You can have free functions that operate on your classes instead of shoehorning every operation into one class or another or creating new ones from whole cloth just to hold a function (e.g. the Hit class mentioned earlier).

Writing methods makes it easy to add new types but not methods; you have to change every class to implement a new method. Writing functions makes it easy to add new function, but you have to update every function for a new type.

Each has its place, and issues arise when certain languages (e.g. Java) or paradigms ("classical" OOP) make it impossible to use one or the other style.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: