Talk:Object (computer science)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This should be moved back to Object (object-oriented programming) for two reasons.

  1. It would be consistent with other topics uner OOP
  2. There are other examples of objects in computer science which do not strictly conform to the definition given in this article. e.g. the Old Object model of Visual Basic.

Sorry but this really doesn't make sense at all. -- Taku 07:03, Oct 13, 2003 (UTC)

personaly, i think it should all stay here, and a redirect from Object (object-oriented programming) to here. tooto 17:21, 6 Aug 2004 (UTC)


Object also receives a redirection from Data Object and is a much more general concept in computer science. Wikipedia needs 2 pages, Object (general) and Object (object-oriented programming). The pages should point one to another showing that one is the specialization of the other.

Geraldo Xexéo (talk) 19:11, 27 January 2009 (UTC)[reply]

Removed some material to avoid mis-attribution[edit]

When editing said page, Taku moved some items to Talk: and then signed his action. Unfortunately, unless you follow the edit history, it then becomes difficult to separate what he said from what he is signing.

Therefore, I deleted the material and left only the fact that he moved it from said page.

Is the sample source code mis-leading?[edit]

Isn't example in this hypothetical language a little bit mis-leading? Shouldn't Fido and Princess be declared of type Dog? Why not use something standard such as Java or C++ in the first place? --Esad 17:15, 8 Feb 2005 (UTC)jai ho

Class-based only[edit]

This article on talks about class-based OOP. Wouter Lievens 12:30, 3 Apr 2005 (UTC)

I know. That's a problem. -- Taku 18:45, Apr 3, 2005 (UTC)

Circular links[edit]

Under the heading "Objects in Object-Oriented Programming", instantiating points a disambiguate page which leads you to Instance (programming) which is a redirect to Object (computer science). In the next para, Instance points to Instance (programming) which, as before, redirects you back to Object (computer science).

I know you OO types love being self-referential, but it doesn't work so well in a Wiki... Shermozle 15:09, 15 December 2005 (UTC)[reply]

Thanks for pointing this out. It's still a problem... —Pengo 11:28, 30 May 2006 (UTC)[reply]
Now it appears to point to instantiation, which is a disambiguation page. I think I will remove this link altogether. --Spoon! 07:07, 4 September 2006 (UTC)[reply]

Add some examples[edit]

Please add some examples to this article. --Gary King 02:25, 26 January 2006 (UTC)[reply]

Best Quote Ever[edit]

"The God object is an example of an anti-pattern." I love it. Out there. I was trying to research programming languages and ended up feeling like I was looking into philosophy and theology. Anyway, I think that sentence would do well to include a brief decription of what is meant by an anti-pattern. You can click through to the link, but I think that the references in the article should be a bit more contained. It's a zinger of a sentence, but it refers to a very specific piece of knowledge that the article shouldn't assume the average reader has. Some minor explanation here would go a long way to make it a little bit less of a 'WTF?'-sounding statement. It almost comes across as a bit of sensationalism. Almost.

It is, however, a fascinating article. Kudos to those of you who put this thing together.

A candidate for deletion?[edit]

"For example, a diagram of a computer monitor is a class (let's call it monitor_class). The actual computer monitor you are looking into is an instance of that class, hence an object"

Eh? Which is the class? Is it the diagram or the computer monitor? If you instantiate an object of class "diagram" you get an instance of "diagram", not an instance of a "computer monitor". Perhaps it's trying to make an analagy between a diagram and a class definition, but if it is, then it's a poor one, poorly stated.

There are lots of other errors in this article as well. But are they worth fixing, is there anything here not already said in the object-oriented programming article?

Any reason why this article shouldn't be nominated for deletion? --Malleus Fatuarum 03:05, 12 August 2007 (UTC)[reply]

There is no reason why this article should be nominated for deletion, if you find errors then tag them with an appropriate template or fix it --Zven (talk) 02:49, 16 April 2008 (UTC)[reply]
While possibly unclear the sentence quoted is not wrong, or at least not wrong for the reasons you imply. While it is true that if you instantiate an object of class "diagram" you get an instance of "diagram". However an instance of one class might well be a class, eg. instances of the class of classes. This is a useful concept in metaprograming. In the case of the sentence quoted the problem is that it is hard to see the diagram for monitors as being the class of monitors. However it's easy to see the diagram as a representation of the class of monitors. A better wording might be For example, a diagram of a computer monitor specifies a class. The actual computer monitor you are looking into is an instance of that class, hence an object. Taemyr (talk) 09:20, 16 April 2008 (UTC)[reply]
Whatever happens, do not delete this article, or at least give ample warning so I can copy the stuff off it so I can personally refer back to it. --AnAbsolutelyOriginalUsername42 (talk) 19:50, 21 February 2010 (UTC)[reply]

Merge section into OOPL[edit]

The section "Object-oriented labguages" should be merged into object-oriented programming language and deleted. All the best, --Jorge Stolfi (talk) 17:35, 12 May 2009 (UTC)[reply]

Drivel[edit]

This article is basically drivel. It confuses several issues: it pretends to be some general defintion of object in computer science, but it's mostly about objects in programming languages. It's also not focused on the technical aspects of an object, but on OOP advocacy. It's a also a brain dump of random OOP topics having object in their name. Pcap ping 06:35, 27 August 2009 (UTC)[reply]

There seems to be a strange war going on between advocates of object based languages and advocates of non-object based languages. Who cares? Just make the article useful for people who want to know about objects. --AnAbsolutelyOriginalUsername42 (talk) 19:52, 21 February 2010 (UTC)[reply]
I agree. E.g., most compilers produce object code files. According to this article the objects therein aren't connected to anything in computer science. It's an article by incompetents. - Alf — Preceding unsigned comment added by 138.124.86.49 (talk) 05:38, 27 August 2012 (UTC)[reply]
I agree this article needs serious work and is poorly written. But just calling it "drivel" isn't really very constructive. I think there is some good information in this article. It goes into details about OO that make conceptual sense together and has a lot of useful info. If there are non OO concepts that you think should be better represented you can of course edit the page and add them. Or if you don't want to do that provide some useful information and references here so someone who will edit can use it. I also think the religious wars are childish and I doubt that anyone who makes strident claims in either direction about OO is a competent IT or academic professional. MadScientistX11 (talk) 23:39, 13 December 2013 (UTC)[reply]

Can we implement OO in any language?!![edit]

This article says "However, objects and object-oriented programming can be implemented in any language." I think it is not true!!! for example, how can someone implement OO in Basic or C? I think this line should be removed.

C support function pointers, so you can make structs that contain both the data and the assosiated functionality. You can also program using explicit *this pointerst. That said, the sentence is unreferenced, and lacks context, so feel free to remove it. Taemyr (talk) 12:32, 30 August 2009 (UTC)[reply]
Partially, depending on what features of OO are considered essential. See Object-oriented programming#Main features. By the way, this article should probably not contain such a discussion, it's off-topic here. See my rant above. Pcap ping 19:24, 30 August 2009 (UTC)[reply]

There seems to be a common misconception in the OOP community that the mere act of combining data and "pointers" somehow creates an "OOP-like" object/method and this is therefore Ipso facto "OOP". A pointer - in its usual sense - is merely a fully resolved reference to an absolute location in memory (in this case usually the absolute address the start of a subroutine). References (to subroutines) however, can take many forms such as:-

  • the actual names of the subroutines (possibly requiring prior dynamic loading by the operating system),
  • a symbolic name of a subroutine - located within the program itself and is essentially
    • - an offset to a label in the program from another fixed label (eg X'01d8' or X'02F6')
  • an index to a list of subroutines (1=first, 2= 2nd and so on)

The last one of these is language independent, machine independent and entirely portable across an entire range of systems. It has also the potential to be:-

  • the simple basis of a branch table in assembly language (offering great efficiency) or
  • the subject of a Switch statement in many HLL programs (potentially offering efficiency - if it's an optimized SWITCH)

Since the index value to a subroutine is essentially also just a data value, combining data variables with a subroutine number - within the same structure - meets the above (limited) view of what consitutes an OOP-like program. I have programmed most of my many successful products (and one off programs) using this "machine & language independent pointer" method for more than 40 years via control tables - which are also essentially entirely portable. This was mostly acheived using assembly language but could equally be implemented in any language. Does this mean that OOP was "invented" by me - no, of course not, it means that combining pointers and data is nothing new and certainly not unique to OOP. It also means that, as PC programmers battled with the primitive micro, they re-invented the wheel many times and gave prior art new names, often without the insight that puts it in its proper perspective. Of course OOP can be implemented in any language and actual pointers are not a necessary prerequisite - as I hope I have explained. This leaves the wider question of whether OOP is necessary or worthwhile - I personally think it is neither and merely confuses programming ken (talk) 10:52, 2 September 2009 (UTC)[reply]

An Object (I'm talking in OOP terms here not the more generic one) is a modeling and data structure concept, it's not tied to any specific language. I've talked to several experts on this topic and they all agree, you can take an OO approach in any language. Which is not to say that using an OO language is not a good idea. Also, regarding C, if you do a google search there is at least one paper that should show up at the top on how to implement OO on top of C. Come to think of it that's really all C++ is anyway, adding an OO layer on top of C, if you don't care about standards anyone can implement their own version of objects in C. And anyway, it's all Turing equivalent so with enough person hours anything you can build in one language can always be built in another. The catch of course is "with enought time". As an actual decision I think building OO on top of C rather than using C++ or Java would be a terrible idea and I can't see a realistic scenario where it would ever make sense from a project standpoint but that's another issue, theoretically absolutely it can be done. MadScientistX11 (talk) 23:14, 13 December 2013 (UTC)[reply]

weird code snippet[edit]

1 int result = 1 0; should be changed to 1 int result = 1; ?

re: Please be more specific to what you are trying to say — Preceding unsigned comment added by 193.219.191.176 (talk) 09:25, 1 October 2012 (UTC)[reply]

Not That Helpful[edit]

I don't understand OOP or objects. I tried to read this article to help rectify that. I have to say it was not that helpful. I agree with Gary King and AnAbsolutelyOriginalUsername42 above. Especially I'd like to see a simple example of a real problem which is best solved with an OOP and by means of explanation showing how much more difficult it is to solve with a non-OOP.Squid57squid (talk) 11:17, 8 April 2010 (UTC)[reply]

I can easily recognize your problem - "understanding" OOP is a near impossible task - as it seems almost everybody connected with it is so blind to the alternatives that they fail to see its obvious shortcomings. Many don't really understand OOP themselves well enough to explain it to others. I have for a long time now, like you, been trying to get someone to show me an example demonstrating the so called advantages of OOP (preferably using simple arithmetic - not barking mad dogs saving Timmy!). One of the biggest claimed advantages is encapsulation. An "OOP object" is supposed to be "data plus its methods" - but serialization does not serialize the method component (only the data and attributes) - the method component is quietly and conveniently forgotten! The resultant serialized data (object?) completely lacks the very methods that were previously considered to be an integral part of the object! How do the OOP protagonists get around this? (I suppose they will try to argue that the methods are hanging around on various libraries waiting to be reconnected - I don't accept that excuse and believe that if OOP objects are indeed "real", they should be, as implied, properly encapsulated. Colt45's or dogs carry their "methods" (fire, bark etc) physically around with them - not stuck on some disconnected far-off entity. This is especially relevant to distributed programming environments - so even more important now than before. Also, OOP is supposed to reduce coding/maintenance costs via "code re-use" but this was possible (and in regular commercial use) in source macros/modular programming/libraries in the 1960's. Nothing new there then - and, in fact, OOP code appears incredibly bloated by comparison. Data (and code) hiding are as daft as they sound. Would a car designer ignore the engine or its efficiency when constructing a vehicle - of course not. Good engineers are not only respected for their knowledge of a subject, they are passionate about efficiency themselves - and rightly so. These are all inconvenient truths for OOP admirers/defenders. OOP critics are ostracized for daring to point out the glaring holes in the OOP paradigm/arguments but, because of the continual computer science training being perpetutated in universities and colleges, the sad myth continues unabated ken (talk) 06:57, 18 May 2010 (UTC)[reply]

Software Component[edit]

We should replace the article "Component-based software engineering" with "Software Component," or at least reinstate the "Software Component" article as an independent item.

See http://en.wikipedia.org/wiki/Talk:Component-based_software_engineering#Software_Component

Contact: juan2000@iJSolve.com —Preceding unsigned comment added by John2000 (talkcontribs) 23:34, 11 April 2010 (UTC)[reply]

Poorly explained article[edit]

Wikipedia is supposed to be like an encyclopedia. I can't see Encyclopedia Brittanica writing an article like this. Technicians should not be allowed to write encyclopedia articles. It takes a science writer to do it. — Preceding unsigned comment added by Two Wrongs (talkcontribs) 02:55, 27 January 2011 (UTC)[reply]


Different strokes for Different Folks[edit]

so many different ways definitions and articles could be written -- so many different possible audiences for those different kinds of articles...

but i wandered in working on a kind of dimension/class based algebra looking for some reinforcement of a definition of "object" as what the entire thing is about -- and find this article really interesting and helpful (should an algebra of "objects" be "located" somewhere, as per some "constructivist" perspective? sometimes i think the answer is "yes" -- and if we want a real empirical ground not only for computer science, but for any kind of science that involves symbolic representation, this approach might be very clarifying). i think i saw the other day that there are over 4,000 wikipedia articles on computer science. let's say some of them are introductory and for general readers, and some are just hot-shot flash visions for people who feel they are on to something brilliant, who are seeing some significant conjunction or reason for writing the article in the first place, and who want to move the science forward. for me, wikipedia is an inspiring source for research articles. i appreciated the "vetted" quality of the articles -- but i also like the inspired punch at the cutting edge as well. thanks.

Bruce Schuman (talk) 19:45, 31 July 2013 (UTC) Bruce Schuman, http://originresearch.com[reply]

An object is not an instance[edit]

An Object is not a memory definition, this is an instance — Preceding unsigned comment added by 190.146.253.173 (talk) 20:38, 12 November 2013 (UTC)[reply]

It all depends. These things aren't cast in stone and usage varies all the time. I've heard people use the term "object" to refer to a class, an instance, or as a generic way to say either a class or an instance. I don't think there is a provably right answer all that matters is that it's clear in the context each time it's used and that it's used consistently in the article. MadScientistX11 (talk) 23:18, 13 December 2013 (UTC)[reply]

Intro text on distributed objects[edit]

The intro for distributed objects currently is: "The definition of an object as an entity that has a distinct identity, state, and behavior, and, it is claimed, the principle of encapsulation, can be carried over to the realm of distributed computing. Paradoxically, encapsulation does not extend to an object's behavior since they (or even their method names) are not serialized along with the data."

First, I think this is very poorly worded and hard to understand. To say that "Paradoxically, encapsulation does not extend to an object's behavior" is I think just wrong. The fact that methods can't be serialized doesn't mean that encapsulation doesn't apply to them. That is what things like IDL are for. They provide encapsulation for method interfaces at the level of distributed systems. MadScientistX11 (talk) 01:13, 14 December 2013 (UTC)[reply]

My Plan to Improve this Article[edit]

I'm working on this right now but in case anyone is watching this page thought I would document what I intend to do before doing it so we can discuss if needed. So far I've re-written the two sections on distributed computing and semantic web. My next step is to tackle the three sections that deal with objects in object-oriented programming. I plan to consolidate all three sections into one section on "Objects in OOP". That section will contain a Main macro that links to this article: Object-oriented programming I may copy some small sections of text from the OOP article. Currently the stuff that is here IMO is far too low level. It jumps into talking about things like files and dot notation that I think are totally inappropriate. We should go into that stuff on an article about a specific OO language but a general overview of the OO concepts doesn't need that and besides there are always unusual but not to be discounted languages that do things differently. But anyway notation and how things are implemented (e.g. files) are too detailed. I plan to make it more conceptual and to make sure it's all backed up by references, which I will also of course add. MadScientistX11 (talk) 19:45, 14 December 2013 (UTC)[reply]

The more I looked at what was currently there and thought about how to reword it the more it occurred to me that I had already written the same ideas in my recent edit of the article on OOP. So I just copied some of that text and then condensed it. I think that is appropriate since this section is now essentially a stub and points to the main article on oop. The examples could be clearer, maybe some diagrams, I may come back and do that later. MadScientistX11 (talk) 20:56, 14 December 2013 (UTC)[reply]

External links modified[edit]

Hello fellow Wikipedians,

I have just modified one external link on Object (computer science). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 00:08, 21 July 2016 (UTC)[reply]

Request for citations[edit]

The article begins with "object" definitions in three contexts. Each could be improved by citing sources. For example, in computer science generally, I think K&R came close to the most general meaning: 1st edition, 1978, p 183, "a manipulatable region of storage" (where execution is a form of manipulation). The OO context sometimes specializes this concept with a concept sharing the name of the genus. This is as in the object article where an OO "object" (species) is an "object" (genus) of some sort. I have also seen OO uses that are somewhat metaphorical: Pressman's "Software Engineering", 2nd edition, 1987, p 336, "a component of the real world that is mapped into the software domain". Citations demonstrate that a presentation is not original. Thecurrentkingoffrance (talk) 20:39, 26 December 2016 (UTC)[reply]