4 ms·
Details could be usefully hidden, but also exposed or partially exposed in unexpected and undocumented ways. OOP is only an attractive and helpful conceptualiz
by HelloNurse 6y ago
Details could be usefully hidden, but also exposed or partially exposed in unexpected and undocumented ways.
OOP is only an attractive and helpful conceptualization of doing something with a data representation in a computer's memory, not a magical way to suppress differences. It doesn't help with incompatible representations, operations and expectations about them except by providing some tools to deal with problems.
On a more formal side, as already noted in other comments, if everything is an Object everything is nothing more than an Object: a one-type programming language is certainly coherent but no good if one wants to write meaningful programs.
- galaxyLogic 6y agoThere is Smalltalk, where everything is an Object including numbers. And many "meaningful" programs have been written in Smalltalk I believe. In Smalltalk even the 'nil' meaning no object at all is an Object.
- ridiculous_fish 6y ago"Everything is an object" is a very deep idea. Make a system where everything is an object and every object knows what it can do: it becomes dynamically self-describing. The "formal side" assumes a static environment, but our OS and apps and browsers are constantly churning. When the runtime reality diverges from the compile-time model, you'll want dynamicism: can this object do that? What happens if I try to invoke an unsupported operation? etc.
- hibbelig 6y agoBut which object does what I need? If a is an array and s is a separator, do I write s.join(a) or a.join(s) or String.join(s, a)?
- scroot 6y agoIn Smalltalk, if you really need to find this, there is the Finder in which you can provide examples of input and output and it will suggest messages that implement the desired functionality. Also, the message does not need to be called "join," especially since it's use in the culture is ambiguous and confusing.
- hibbelig 6y agoThat's pretty amazing. Thank you!