TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Objects, Identity, and Concept-formation (2008)

32 pointsby 1781almost 11 years ago

10 comments

kazinatoralmost 11 years ago
&quot;Object-oriented programming&quot; in its basic form means that the data manipulated in a computer program is self-describing. We can ask a datum, &quot;what are you? what type?&quot;. The functions of that program are organized around data. This is in contrast with the form of programming in which data is just some storage, which is given a meaning by the algorithm that operates on it; it is not self-describing.<p>Self-describing data lets us then have generic operations. For instance, if an object hold a sequence of other object, we can create an operation which extracts the N-th one. And we can make that same operation work for an object which is a character string, vector, list. This is because the function can inquire the object what it is, and then call the appropriate concrete implementation which does the right thing for that type.<p>This leads us to realize that type is connected to the operations which are applicable. Those objects are somehow of the same &quot;kind&quot;. This gives rise to the concept of subtyping and substitutability: a string is a kind of sequence and so is a list and we can have operations on sequences.<p>The non-object-oriented concepts are all that cruft from various languages which tries to strangle OO: virtual base classes, protected members, methods within class scope, scope resolution, copy constructors, yadda yadda ad nauseum ... We are led to believe that OO requires this or requires that. It&#x27;s not OO if there is no encapsulation. It&#x27;s not OO if there is no language-enforced &quot;information hiding&quot;. It&#x27;s not OO if there is no private&#x2F;public access mechanism. It&#x27;s not OO if method calls aren&#x27;t represented as message passing. It&#x27;s not OO if methods aren&#x27;t in a compile-time class scope together with data members. ...
评论 #7995320 未加载
评论 #7995039 未加载
TelmoMenezesalmost 11 years ago
The term &quot;object-oriented&quot; was coined by Alan Kay, and he did provide a much more precise meaning. Unfortunately, the term became a fad and was then diluted into all sorts of vaguely related ideas.<p><a href="http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented" rel="nofollow">http:&#x2F;&#x2F;c2.com&#x2F;cgi&#x2F;wiki?AlanKaysDefinitionOfObjectOriented</a><p>I find the original idea deep and worth thinking about.
评论 #7995089 未加载
评论 #7995226 未加载
评论 #7995382 未加载
calvinsalmost 11 years ago
&quot;Valid concepts are arrived at by induction.&quot;<p>If the point is to argue that OOP is not a valid concept, the author should show first that &#x27;programming&#x27; is a valid concept (using the same definitions) and that there are some related concepts (e.g., &#x27;functional programming&#x27;) that are valid, because if the same argument can be applied to most or all other &#x27;* programming&#x27; concepts too (not to mention concepts like &#x27;validity&#x27; and &#x27;concept&#x27;), then the point is not specific to OOP at all.<p>Incidentally, <a href="http://en.wikipedia.org/wiki/Prototype_theory" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Prototype_theory</a> seems a much better starting point for thinking about concepts in general, and &#x27;* programming&#x27; in particular.
评论 #7995233 未加载
InfiniteRandalmost 11 years ago
Well, the author recommends induction as a means of figuring this out, and it seems for induction to work we need to have some existing example to induce the principle from (if I am remembering my maths, I might not be). So to figure out our concept it may be worth taking a look at what the use of object-oriented features is, and use that as a starting point. Maybe, again I am a little rusty on my inductive reasoning.<p>I think one thing that strikes me with Object-oriented programming in general is the idea of data management and function management.<p>I guess if we look at the features that are associated with object-orientation (I am not pretending that I am being strictly inductive at this point, although I think this is vaguely inductive), I would say that it takes the management and organization of programming concepts, such as data and function organization, and embeds it into the language itself.
评论 #7995093 未加载
techadvalmost 11 years ago
The mainstream programming language community has a pretty strong consensus on what OOP means, in terms of language features.<p>Some people out there seem to have some confused notions of what OOP is. That doesn&#x27;t mean there isn&#x27;t a well-understood and more-or-less accepted definition, at least in academia.<p>Edit for downvotes: dynamic dispatch + associating methods with classes, often times but not necessarily accompanied by an inheritance hierarchy. Of course there&#x27;s lot of room for design decisions (and prototype-based languages are only awkwardly encapsulated in that group), but these features are basically unique to OOP languages.<p>The point is that you could put a language with these features in front of any random sample of PL researchers and they would probably more-or-less agree on whether the language has OO features. That&#x27;s more or less the definition of scientific consensus.
评论 #7995094 未加载
kazinatoralmost 11 years ago
There is such a thing as object-oriented programming; the author just hasn&#x27;t encountered it through the tools that he was led to believe were OO programming tools.<p>&quot;I didn&#x27;t find Tao in Java or GoF&quot; does not imply &quot;there is no Tao&quot;.
audionerdalmost 11 years ago
Alan Kay coined the term &quot;object-oriented&quot; for software architecture in the late &#x27;60’s. He offers a good explanation of it: <a href="http://programmers.stackexchange.com/a/58732" rel="nofollow">http:&#x2F;&#x2F;programmers.stackexchange.com&#x2F;a&#x2F;58732</a><p>“OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late-binding of all things.” — Alan Kay<p>It&#x27;s easy to assume only languages with Class and Object abstractions are &quot;object-oriented&quot;, but the &quot;orientation&quot; is really more about your mental model of the system as differentiated objects that communicate via messages.
mpweiheralmost 11 years ago
<a href="http://www.dreamsongs.com/ObjectsHaveNotFailedNarr.html" rel="nofollow">http:&#x2F;&#x2F;www.dreamsongs.com&#x2F;ObjectsHaveNotFailedNarr.html</a>
dangalmost 11 years ago
Url changed from <a href="http://runarorama.github.com/blog/2008/12/04/no-such-thing/" rel="nofollow">http:&#x2F;&#x2F;runarorama.github.com&#x2F;blog&#x2F;2008&#x2F;12&#x2F;04&#x2F;no-such-thing&#x2F;</a>, which redirects to this.
a3voicesalmost 11 years ago
Programming in C which isn&#x27;t &quot;object oriented&quot; is very similar to say, Java. You make the same architectural diagrams on a whiteboard for both. So I agree with the author.
评论 #7995031 未加载