Microsoft Store
 

Abstraction (computer science)


 

In computer science, abstraction is a mechanism and practice to reduce and factor out details so that one can focus on few concepts at a time. It is by analogy with 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.

Related Topics:
Computer science - Abstraction - Mathematics - Definition - Abstraction

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

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.

Related Topics:
Number - Programming language

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Roughly speaking, abstraction can be either that of control or data. Control abstraction is the abstraction of actions while data abstraction is that of data structures. For example, control abstraction in structured programming is the use of subprograms and formated control flows. Data abstraction is to allow for handling data bits in meaningful manners. For example, it is the basic motivation behind datatype. Object-oriented programming can be seen as an attempt to abstract both data and code.

Related Topics:
Structured programming - Subprogram - Control flow - Datatype - Object-oriented programming

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The concept of abstraction is itself a declarative statement in programming languages such as C++ or Java, using the keywords virtual or abstract, respectively. 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.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Examples are lambda abstractions (making a term into a function of some variable), higher-order functions (parameters are functions), bracket abstraction (making a term into a function of a variable).

Related Topics:
Lambda abstraction - Higher-order function - Bracket abstraction

~ ~ ~ ~ ~ ~ ~ ~ ~ ~