Jump to content

Talk:Abstraction (computer science)

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

Old topics

[edit]

I think the current page misses the whole point. Making some minor adjustments to correct worst mistakes.


The words from the article could be divorced from the OOP POV thus, simply making it a programming language statement, as if a programmer were thinking about working on a project.


In computer science, abstraction is the analog of abstraction in mathematics. The mathematical technique of abstraction begins with mathematical definitions; this has the fortunate effect of finessing some of the vexing philosophical issues of abstraction.

Abstraction allows programmers to think simply about a problem, by deferring unimportant detail for later, while still allowing thought about more important goals, in stages of thinking, not all-at-once. For example, in both computing and in mathematics, numbers are concepts in the programming languages, as founded in mathematics. Implementation details depend on the hardware and software, but this is not a restriction because the computing concept of number is still based on the mathematical concept.

During software development, the client typically understands the application, and can understand the use of the work. The semantics of the application dictate the structure of the implementation.

For example, Linda abstracts the concepts of server and shared data-space to facilitate distributed programming; that is, the semantics of distributed processing were implemented in Linda. In Java, abstraction takes place at the level of extended data types. Such types are called classes, and objects are instances of said class. The concept of abstraction is itself a declarative statement in programming languages such as C++ or Java, using the keywords virtual or abstract, respectively, to decorate the class name. After such a declaration, it is the responsibility of the programmer to implement a class to instantiate the object of the declaration. Or, if the specification language is UML, for example, the abstract classes are simply left abstract during the architecture and specification phase of the project.

Thus, in the architecture stage, one could define an abstract data type called lookup table, where keys are uniquely associated with values, and values may be retrieved by specifying their corresponding keys. Such a lookup table may be implemented in various ways: as a hash table, a binary search tree, or even a simple linear list (which is actually quite efficient for small data sets). As far as client code is concerned, the abstract properties of the type are the same in each case.

The interface between components of an implementation forms a contract on agreed behaviour between components of the application. This interface can be sybmbolized in various ways, such as Ward Cunningham's CRC cards.

Some other languages that implement data abstraction include Ada and Modula-2.

[PROPOSE moving this back to the OOP page]

The above paragraphs provide a substantially better introduction to abstraction than what is presently shown. If no one objects I will be making a **HUGE** change by replacing the current introduction in its entirety with this one. I plan to do this next time I visit this page. Vonkje (talk) 20:07, 26 August 2009 (UTC)[reply]
What proposal exactly are you talking about? Pcap ping 07:53, 27 August 2009 (UTC)[reply]

Abstraction in object oriented programming

[edit]

Object-oriented languages are commonly claimed to offer data abstraction; however, the inheritance concept tends to put information in the interface that more properly belongs in the implementation; thus, changes to such information ends up impacting client code, leading directly to the fragile base class problem.

[propose a REPLACE of the Animals code with some Object diagram]

I agree with the replace suggestion. IMO many of the computer science articles related to object-orientation do this, they jump into psuedocode or even worse C++ code examples that get into all kinds of hairy etail not all that relevant to the article but they never bother to explain the basic idea. I'm pretty technical, I still program in Java and I've been programming since the 70's and I usually find those examples too detailed and hard to follow. If they are hard for met o follow than they are hard for the vast majority of people who come to these pages. --MadScientistX11 (talk) 14:15, 4 August 2014 (UTC)[reply]

Further Reading

[edit]
  • Abelson, Harold, Gerald Jay Sussman with Julie Sussman. (1996) ISBN 0262011530 Structure and Interpretation of Computer Programs (Second edition). The MIT Press


[LEAVE this in the abstraction page]

This article needs more inline citations. If people know of references that relate to the topic a far better contribution than putting them in Further Reading is to add them as a reference to the appropriate part of the article. If they AREN'T useful to serve as a reference for any of the article than probably they aren't relevant or important enough to be added to Further Reading in the first place. --MadScientistX11 (talk) 14:17, 4 August 2014 (UTC)[reply]

See also

[edit]

The opposite of abstraction is instantiation.

This article (or an earlier version of it) contains material from FOLDOC, used with permission. Modify if needed.

169.207.115.74 22:50, 1 Nov 2003 (UTC)


I had a real hard time following your comments 169.207.115.74. I can't tell if you made all those comments or not. I made a recent change to the definition because it seemed to be poorly defined, and I researched it for about two hours online and in my text books. The best I could come up with was the definition found in a textbook used in MIT, which I referenced, and this is the page from that book: http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html.

Your comments about not including a reference to OOP seem to me to be oriented towards optimized for purity at the expense of usefulness. As abstraction is a necessary concept of OOP and OOP has become mainstream, not referencing OOP would be incomplete though the comments about OOP listed above are definitely POV.

While the animal code is not the best, code is helpful and I would recommend it stay or be replaced by better. Adding a diagram could help though.

FWIW MikeSchinkel 11:15, 2 Nov 2003 (UTC)

Layers or Levels of Abstraction

[edit]

Shouldn't the heading title "Layers of Abtraction" really be "Levels of Abstraction"? If no one objects, I will change it. Montalvo 01:18, 29 November 2005 (UTC)[reply]

The database layers mentioned in the text are not layers of abstraction! —Preceding unsigned comment added by 131.188.36.28 (talk) 14:22, 11 March 2009 (UTC)[reply]

Rationale

[edit]

What does the use of the word "others" mean in the first sentence? - KitchM (talk) 06:12, 30 August 2009 (UTC)[reply]

No idea. There were/are a bunch silly vague statements in this article. Feel free to fix them. I've fixed some in the lead (see next talk section), but undoubtedly there are more in the body, as you discovered. Pcap ping 19:03, 30 August 2009 (UTC)[reply]

Better Definition

[edit]

There should be found a better definition than that which is given. It lacks the clarity and simplicity necessary to explain it to the layperson.

One might start with these other definitions: 1. an abstracting or being abstracted; removal 2. formation of an idea, as of the qualities or properties of a thing, by mental separation from particular instances or material objects 3. an idea so formed, or a word or term for it “honesty” and “whiteness” are abstractions 4. an unrealistic or impractical notion

And for "abstract": 1. Considered apart from concrete existence: an abstract concept. 2. Not applied or practical; theoretical. 3. Difficult to understand; abstruse: abstract philosophical problems. 4. Thought of or stated without reference to a specific instance: abstract words like truth and justice.

And yet computing is all about very exacting detail that is applied, practical and concrete.

Perhaps the word "abstraction" within the field of computing may be better defined within the ideas of simple ones and zeros, as well as within the idea of grouping efforts together by finding commonality, and thereby reaching a common point of reference for the definition.

Further, the introduction of the concept should include the reasoning behind using it in the first place within this particular application. - KitchM (talk) 06:35, 30 August 2009 (UTC)[reply]

The intro to this article was even more impenetrable a couple of weeks ago. I've done a little work on it (before you posted the above), which covered some of your suggestions, e.g. finding commonality. Feel free to improve the presentation further. Pcap ping 18:34, 30 August 2009 (UTC)[reply]
Abstraction is much closer related to Polymorphism than what the article makes to believe. As a matter of fact, refactoring towards Polymorphism, quite often would mean the act of doing Abstraction. The article about Polymorphism is much more cleaner, and should be used as the base article. I also do not think there is a need of trying to list all the implementing concepts on a per language basis. They belong maybe on a separate article on how a specific language implements the OOP model as a whole. There is too much too read right now. Jdesmet (talk) 19:27, 4 December 2018 (UTC)[reply]
I think that the scope of this article is currently far too large. I agree with Jdsmet above that listing all of the ways that abstraction can be done is not the proper to build this article as a whole. Perhaps most references to specific ways should be moved to their own articles, and either placed in additional reading, or otherwise have a catagory created that this article simply references to. This article currently depends on defining abstraction by the specific ways that abstraction is done, rather than the core concepts behind it. TheHottestPotato (talk) 10:53, 1 June 2019 (UTC)[reply]
I wonder if the second sentence is correct, it says
(Abstraction is) the process of removing physical, spatial, or temporal details[2] or attributes in the study of objects or systems to focus attention on details of greater importance;[3]
I get it has a reference and I am nobody, but it still strikes me as a subjective point of view since details of very large importance varies with people. If you ask what is important about an object you will get different answers depending on the use case that object is into. So I would say you abstract a real world object into an abstract one to focus your attention on the behaviors and states you are interested in. /end rant Simbioz (talk) 01:06, 7 May 2021 (UTC)[reply]
This sentence does not make much sense to me:
the concept of procedures, functions, or subroutines which represent a specific of implementing control flow in programs;
Simbioz (talk) 02:26, 7 May 2021 (UTC)[reply]

Starting revisions now

[edit]

This article is currently listed as Start quality while also being of Top' importance. It is for this reason that I will be taking on revisions.

  • I am currently in the process of gathering references. There seems to be literature on treating abstraction as a concept itself, so I'll read those and get back here and edit it.
  • Abstraction is a very fishy term -- there exist different camps (e.g. OOP + functional/type-theorist) which use abstraction differently. For example, the lambda calculus makes use of their abstraction rule to produce terms in the recursive definition of the lambda calculus. Abstraction is also cited as a concept often talked about by the OOP camp.

- Atasato (talk) 21:01, 9 June 2018 (UTC)[reply]

Talking about "abstraction" like it has some special definition throughout computer science is a bad trend in software that misleads new developers. Anyone who finds this page before the math-related one is cursed. Zabublex (talk) 02:25, 19 April 2020 (UTC)[reply]
Not sure your point. Abstraction is IMO a well-defined concept although I agree that in software, it does not have a special meaning (outside what it generally means). In fact, I struggle to understand the value of this article. But, abstraction is a BIG part of software so maybe this article could have value. But it shouldn't tie the general concept tightly with specific tech except as examples. Stevebroshar (talk) 12:10, 23 August 2025 (UTC)[reply]
Abstraction is a relatively abstract concept ;) No jest intended. Abstraction is not owned or defined by any particular technology. In general, abstraction is not a software term. It's used alot in software, but it's a general concept that applies to software in the same way that it applies to anything. In that sense this article probably shouldn't exist. But, if it does, it should be about the aspects that are software specific. That is hard to do for such a general and abstract concept. But one thing this article should not do is tie the general concept tightly with specific technology such as OOP or functional programming. Stevebroshar (talk) 12:07, 23 August 2025 (UTC)[reply]

Abstraction is not special WRT attributes

[edit]

WRT "...abstraction is the process of generalizing concrete details, such as attributes, ..."

What do attributes have to do with the definition of abstraction? Generalizing details that are attributes? Attributes don't have a special relationship to abstraction. Stevebroshar (talk) 08:11, 24 August 2025 (UTC)[reply]

Abstraction does not have a special relationship with OOP

[edit]

WRT "Abstraction is a fundamental concept in computer science and software engineering, especially within the object-oriented programming paradigm..."

Abstraction applies equally to all coding, all languages. Stevebroshar (talk) 08:13, 24 August 2025 (UTC)[reply]

Not good examples

[edit]

WRT: "Examples of this include: the usage of abstract data types to separate usage from working representations of data within programs; the concept of functions or subroutines which represent a specific way of implementing control flow; the process of reorganizing common behavior from groups of non-abstract classes into abstract classes using inheritance and sub-classes, as seen in object-oriented programming languages."

First, I think it's awkward to include examples so early in the article. Examples are good, but always less than a definition. Second, what about the concept of function defines what abstraction is? The third item (about abstract classes) is an example, but it's relatively technical for an intro and highly specific compared to the first two items. Stevebroshar (talk) 08:17, 24 August 2025 (UTC)[reply]

What is this about?

[edit]

WRT "Computing mostly operates independently of the concrete world. The hardware implements a model of computation that is interchangeable with others. The software is structured in architectures to enable humans to create the enormous systems by concentrating on a few issues at a time. These architectures are made of specific choices of abstractions. Greenspun's tenth rule is an aphorism on how such an architecture is both inevitable and complex."

First sentence is fluff. What does independently of the concrete world mean? and in what sense does mostly apply? The second sentence is in left field. Why talk about hardware here? What is a model of computation? What does interchangeable mean here? The third sentence is word salad. Software is structed in architecture means what? Structure does not enable humans to create system. Saying enormous is hardly encyclopedic. Architectures are not made of choices of abstractions.

A paragraph should introduce a topic in the first sentence and then support it in the subsequent sentences. This paragraph starts with and therefore is about: Computing operates independently of the concrete word. But the 2nd sentence veers off that topic by talking about hardware. Then there's introduction of structure (off topic). Then there's enormous systems (off topic). Then, choices (off topic). Then some weak connection to abstraction. Then way in left field: Greenspun's thing. This is not a paragraph. It's just sentences jammed together. Stevebroshar (talk) 08:33, 24 August 2025 (UTC)[reply]

Language abstraction is a central form of abstraction in computing

[edit]

WRT "Language abstraction is a central form of abstraction in computing" Definitely not! Or maybe: what the heck is 'language abstraction'? If this means abstraction manifests due to the features of a language, then I'd say no it doesn't. Abstraction transcends language. One uses language to create/define an abstraction, but the language is just the means. It is not inherently the origin of abstraction. It's a tool; not the result. If the statement is saying that we encode an abstraction via a language, then sure, that's true. If that's the intended meaning, then the wording needs an update. Stevebroshar (talk) 14:57, 1 September 2025 (UTC)[reply]