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

Take any Object-Oriented language. Then modify its definition so that any class can have just a single method (as opposed to any number of methods).

You now have a new language which you could call a procedural- or functional language based on the set of features that were present in the language you started from. But it is no longer an Object-Oriented language.

To make it more concrete start with Java compiler but modify it so it only allows max one method per class.

You now have NOOP-Java. (Non Object-Oriented Java).

Are you happy? Is this NOOP-Java somehow better than the plain old Java? If not really then removing the OOP-ness did not really help did it?. OOP is good. You want to keep OOP, not remove it.

OOP lets you have multiple functions associated with a data-structure the details of which you hide behind those functions (a.k.a. methods). I think THAT is the essence of OOP. You can have multiple functions attached to the same data-structure and only those specific functions can read and write that data-structure.

Isn't that something that really is so useful that getting rid of that feature, getting rid of "OOPness", would be crazy?



Put shackles on your feet then try to run. Now, cut off your feet completely and try to run again. See? Shackles were good for you.




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

Search: