4 ms·
If this is the essence of OOP, would you consider modules/existential-types in StandardML to be OOP? As a followup, what about OCaml (is that "more OOP"?)
by chriswarbo 5y ago
If this is the essence of OOP, would you consider modules/existential-types in StandardML to be OOP? As a followup, what about OCaml (is that "more OOP"?)
- jcelerier 5y agoML modules are definitely OO
- c-cube 5y agoSee, that's just ridiculous and shows how undefined and vague "OO" is. The only relevant feature there is encapsulation, that most languages provide in some way. How is that OO? I vote for just not using this term anymore and talk about class based langusges or prototype languages or whatever.
- mypalmike 5y agoThe problem isn't that the term is poorly defined. It's that it's widely misused. Dynamic dispatch (basically "inheritance") is what most experts claim to be the defining feature necessary to claim OO.
- jcelerier 5y ago> The only relevant feature there is encapsulation, that most languages provide in some way. How is that OO? PL researches seem to have no trouble finding equivalences between ML modules and OO : https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.53.5372&rep=rep1&type=pdf https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.53... My personal opinion which tries to be as general as possible to encompass most definitions is that OO just means that semantic entities can bind a set of named values with a set of named operations / functions / methods / whatever you call them. struct foo { int bar; void (*compute)(int x, int y); }; is also OO.