Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Programming paradigm
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Languages and paradigms == === Machine code === [[Machine code]] is the lowest-level of computer programming as it is [[Instruction set|machine instructions]] that define behavior at the lowest level of abstract possible for a computer. As it is the most prescriptive way to code it is classified as imperative. It is sometimes called the [[first-generation programming language]]. === Assembly === [[Assembly language]] introduced mnemonics for machine instructions and [[memory address]]es. Assembly is classified as imperative and is sometimes called the [[second-generation programming language]]. In the 1960s, assembly languages were developed to support library COPY and quite sophisticated conditional macro generation and preprocessing abilities, CALL to [[subroutine]], external variables and common sections (globals), enabling significant code re-use and isolation from hardware specifics via the use of logical operators such as READ/WRITE/GET/PUT. Assembly was, and still is, used for time-critical systems and often in [[embedded system]]s as it gives the most control of what the machine does. === Procedural languages === [[Procedural language]]s, also called the [[third-generation programming language]]s are the first described as [[high-level programming language|high-level languages]]. They support vocabulary related to the problem being solved. For example, * COmmon Business Oriented Language ([[COBOL]]){{snd}} uses terms like [[computer file|file]], [[move (command)|move]] and [[copy (command)|copy]]. * FORmula TRANslation ([[FORTRAN]]){{snd}} using [[mathematical]] language terminology, it was developed mainly for scientific and engineering problems. * ALGOrithmic Language ([[ALGOL]]){{snd}} focused on being an appropriate language to define [[algorithm]]s, while using mathematical language terminology, targeting scientific and engineering problems, just like FORTRAN. * Programming Language One ([[PL/I]]){{snd}} a hybrid commercial-scientific general purpose language supporting [[pointer (computer programming)|pointer]]s. * Beginners All purpose Symbolic Instruction Code ([[BASIC]]){{snd}} it was developed to enable more people to write programs. * [[C (programming language)|C]]{{snd}} a general-purpose programming language, initially developed by [[Dennis Ritchie]] between 1969 and 1973 at [[AT&T Bell Labs]]. These languages are classified as procedural paradigm. They directly control the step by step process that a computer program follows. The [[efficacy]] and [[algorithmic efficiency|efficiency]] of such a program is therefore highly dependent on the programmer's skill. === Object-oriented programming === {{Main|Object-oriented programming}} In attempt to improve on procedural languages, [[object-oriented programming]] (OOP) languages were created, such as [[Simula]], [[Smalltalk]], [[C++]], [[Eiffel (programming language)|Eiffel]], [[Python (programming language)|Python]], [[PHP]], [[Java (programming language)|Java]], and [[C Sharp (programming language)|C#]]. In these languages, [[data]] and methods to manipulate the data are in the same code unit called an [[object (computer science)|object]]. This [[Encapsulation (computer programming)|encapsulation]] ensures that the only way that an object can access data is via ''[[Method (computer programming)|methods]]'' of the object that contains the data. Thus, an object's inner workings may be changed without affecting code that uses the object. There is [[Object-oriented programming#Criticism|controversy]] raised by [[Alexander Stepanov]], [[Richard Stallman]]<ref>{{cite web|url=http://groups.google.com/group/comp.emacs.xemacs/browse_thread/thread/d0af257a2837640c/37f251537fafbb03?lnk=st&q=%22Richard+Stallman%22+oop&rnum=5&hl=en#37f251537fafbb03|title=Mode inheritance, cloning, hooks & OOP (Google Groups Discussion)}}</ref> and other programmers, concerning the efficacy of the OOP paradigm versus the procedural paradigm. The need for every object to have associative methods leads some skeptics to associate OOP with [[software bloat]]; an attempt to resolve this dilemma came through [[Polymorphism (computer science)|polymorphism]]. Although most OOP languages are third-generation, it is possible to create an object-oriented assembler language. [[High Level Assembly]] (HLA) is an example of this that fully supports advanced data types and object-oriented assembly language programming{{snd}} despite its early origins. Thus, differing programming paradigms can be seen rather like ''motivational [[meme]]s'' of their advocates, rather than necessarily representing progress from one level to the next.{{Citation needed|date=March 2018}} Precise comparisons of competing paradigms' efficacy are frequently made more difficult because of new and differing terminology applied to similar entities and processes together with numerous implementation distinctions across languages. === Declarative languages === A [[declarative programming]] program describes what the problem is, not how to solve it. The program is structured as a set of properties to find in the expected result, not as a procedure to follow. Given a database or a set of rules, the computer tries to find a solution matching all the desired properties. An archetype of a declarative language is the [[fourth-generation programming language|fourth generation language]] [[SQL]], and the family of functional languages and logic programming. [[Functional programming]] is a subset of declarative programming. Programs written using this paradigm use [[subroutine|functions]], blocks of code intended to behave like [[function (mathematics)|mathematical functions]]. Functional languages discourage changes in the value of variables through [[assignment (computer science)|assignment]], making a great deal of use of [[recursion (computer science)|recursion]] instead. The [[logic programming]] paradigm views computation as [[automated reasoning]] over a body of knowledge. Facts about the [[domain (software engineering)|problem domain]] are expressed as logic formulas, and programs are executed by applying [[inference rule]]s over them until an answer to the problem is found, or the set of formulas is proved inconsistent. === Other paradigms === [[Symbolic programming]] is a paradigm that describes programs able to manipulate formulas and program components as data.<ref name="symbolic-programming-lisp"/> Programs can thus effectively modify themselves, and appear to "learn", making them suited for applications such as [[artificial intelligence]], [[expert system]]s, [[natural-language processing]] and computer games. Languages that support this paradigm include [[Lisp (programming language)|Lisp]] and [[Prolog]].<ref>{{cite web |url=http://www.allbusiness.com/glossaries/symbolic-programming/4950308-1.html |title=Business glossary: Symbolic programming definition |access-date=2014-07-30 |website=allbusiness.com }}</ref> [[Differentiable programming]] structures programs so that they can be [[Differentiation (mathematics)|differentiated]] throughout, usually via [[automatic differentiation]].<ref>{{Citation|last1=Wang|first1=Fei|title=Backpropagation with Callbacks: Foundations for Efficient and Expressive Differentiable Programming|date=2018|url=http://papers.nips.cc/paper/8221-backpropagation-with-callbacks-foundations-for-efficient-and-expressive-differentiable-programming.pdf|work=Advances in Neural Information Processing Systems 31|pages=10201β10212|editor-last=Bengio|editor-first=S.|publisher=Curran Associates, Inc.|access-date=2019-02-13|last2=Decker|first2=James|last3=Wu|first3=Xilun|last4=Essertel|first4=Gregory|last5=Rompf|first5=Tiark|editor2-last=Wallach|editor2-first=H.|editor3-last=Larochelle|editor3-first=H.|editor4-last=Grauman|editor4-first=K.}}</ref><ref name="innes">{{Cite journal|last1=Innes|first1=Mike|date=2018|title=On Machine Learning and Programming Languages|url=http://www.sysml.cc/doc/37.pdf|journal=SysML Conference 2018|access-date=2019-02-13|archive-url=https://web.archive.org/web/20180920175619/http://www.sysml.cc/doc/37.pdf|archive-date=2018-09-20|url-status=dead}}</ref> [[Literate programming]], as a form of [[imperative programming]], structures programs as a human-centered web, as in a [[hypertext]] essay: documentation is integral to the program, and the program is structured following the logic of prose exposition, rather than compiler convenience. [[Symbolic programming]] techniques such as [[reflective programming]] (reflection), which allow a program to refer to itself, might also be considered as a programming paradigm. However, this is compatible with the major paradigms and thus is not a real paradigm in its own right.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)