|Programming paradigm has been listed as a level-4 vital article in Technology. If you can improve it, please do. This article has been rated as C-Class.|
|WikiProject Computer science||(Rated C-class, Mid-importance)|
- 1 Introduction
- 2 Hierarchy
- 3 Major list refactoring
- 4 Transference of the hierarchy to a separate template
- 5 Dubious statements referring to 'Advances', rather than alternative approaches
- 6 Code re-use
- 7 Below are old comments
- 8 Suggestions for improvement
- 8.1 Suggested improvement to the History section
- 8.2 "General-purpose programming languages" points here - WTF?
- 8.3 Is multi-paradigm a paradigm?
- 8.4 When is a paradigm not a paradigm?
- 8.5 The Intro does not meet Wiki standards
- 8.6 Haskell is single-paradigm ?
- 8.7 The concept!
- 8.8 C++ is not OOP accordingly to the creator of Object-Oriented Programming
- 8.9 Header section
- 8.10 "Criticism"?
- 8.11 Symbolic Programming
- 8.12 Concept Programming
I deleted the following sentence, because it does not make sense:
Their foundations are distinct models of computation: Turing machine for object-oriented and imperative programming, lambda calculus for functional programming, and first order logic for logic programming.
Reasons for deletion: First-order logic is not a model of computation. Turing-machines are not specific to the OO and imperative paradigm. Turing-machines and Lambda-calculus are both universal models of computation and interchangeable. Imperative programming can be modeled by lambda-calculus. Functional programs can be compiled to Turing-machines. In practice, imperative programming relates more to Random-Access-Machines than Turing machines. — Preceding unsigned comment added by 18.104.22.168 (talk) 14:36, 17 April 2013 (UTC)
I propose we work towards creating a paradigm hierarchy. For instance, procedural programming is a sub-paradigm of imperative programming, and both are structured programming paradigms. However, in the present state all of these paradigms are listed individually and the relationships between each are not as well defined as they could be.
Though, I recognize not all paradigms fit neatly into a hierarchy, but that information is useful to the reader in comparing paradigms. --DanDanRevolution 13:49, 6 April 2006 (UTC)
- I agree, I think some sort of hierarchy ought to be imposed. Specifically, I was not aware of many of these "paradigms" and was expecting to just see "the big 5" (functional, object, imperative, procedural, logic) which seemingly ought to be featured more prominently. For instance, recursive is not something which is wholly exclusive of other larger scoped paradigms. --Belg4mit 22:40, 9 April 2007 (UTC)
- I agree, too. I can't find my way around, at the moment... - Draketo 08:58, 19 July 2007 (UTC)
- I agree. I think that there should be a clear distinction between programming paradigms and programming styles/techniques.
In my opinion it would be nice to include an example list of language following each paradigm and a picture showing sub-paradigm dependencies and/or paradigm "opposition". - BordaiGorl (talk) 09:59, 6 October 2008 (UTC)
Major list refactoring
I've made an initial effort to categorize the recognized paradigms in a well-defined, consensual hierarchy. I am trying to turn a list into a tree (or a small set of trees). The two major hierarchies I've created are 1) declarative programming (which contains "logic programming", "functional programming", "constraint programming", etc.) and 2) imperative programming (which contains "procedural", "OO", "aspect-oriented", etc.). I believe a well-organized hierarchy gives the reader more useful information for paradigm comparisons than an unorganized list of paradigms. I ask you to help me improving that classification and delimiting orthogonal hierarchies (e.g. "recursive" X "iterative"). --Antonielly (talk) 11:28, 15 October 2008 (UTC)
- This seems to be a classification you just made up. Lisp is not a declarative programming language. --FOo (talk) 01:27, 16 October 2008 (UTC)
- Both the article about declarative programming and the Category:Declarative programming languages consider functional programming languages as declarative (instead of imperative). See also the corresponding entry at Encyclopaedia Britannica, which says that both functional languages and logic languages are declarative. Of course, someone could define declarative programming in such a way as to exclude functional programming, but most of the material I've read about the subject (in books, papers, etc.) seem to conventionally imply "declarative" as a rough synonym of "non-imperative", which would include functional languages (as far as they follow the functional style, at least). For more authoritative material, see the academic papers and books listed in this simple search at Google Scholar: . --Antonielly (talk) 11:01, 16 October 2008 (UTC)
Transference of the hierarchy to a separate template
User:LinguistAtLarge has had the smart idea of transfering the contents of the "Hierarchy of programming paradigms" section to the Template:Programming paradigms. This way, it will be possible to refer to the paradigms hierarchy in all the articles about every programming paradigm and give the hierarchy a better look and feel while still keeping the maintenance of the hierarchy centralized into only one place (the template). I agree with his idea. Since that template has been included in the article, I have removed the whole "Hierarchy of programming paradigms" section. --Antonielly (talk) 00:20, 22 December 2008 (UTC)
Dubious statements referring to 'Advances', rather than alternative approaches
'Dubious' tags added where thought appropriate and "some people believe..." type comments —Preceding unsigned comment added by 22.214.171.124 (talk) 07:15, 22 March 2009 (UTC) There is an implication that each 'paradigm' is superior to the previous one. The entire article needs much more work by an experienced programmer with much more insight into the true history of computer hardware/ software technology. —Preceding unsigned comment added by 126.96.36.199 (talk) 07:36, 22 March 2009 (UTC)
Modular programming in conventional languages (Assembler, Cobol, PL/1 etc) has been around since early 1960's (at least) and provided a very simple and much used method of code re-use (and functional 'isolation' as claimed for OOP objects) , as did in-line and Called subroutines, in-line Assembly language macros and other sophisticated pre-processors. —Preceding unsigned comment added by 188.8.131.52 (talk) 08:19, 22 March 2009 (UTC)
Below are old comments
http://en.wikipedia.org/wiki/Comparison_of_programming_languages what is Mathematica now? Procedural or rulebased (as prolog)
I removed the redirect link since I think there's a place for a proper 'Programming Paradigms' page. The paragraph in the prgLang page is short and good for a prgLang page, but I believe a more in depth discusion should be worth while. Equivalently, I think we should have an equially short discussion of prgLangs, here.
I removed the Literate Programming link as it is not a programming paradigm, but rather a programming technique, specifically concerning program documentation. One can perform literate programming in C, C++, or in any other language that supports the tools. The reason why I think it is different is because literate programming doesn't relate to how the program is modeled, but rather how the program is documented. However, literate programming is (very much) important to mention somewhere, but most likely in another category.
In what sense does "lambda calculus stand above all the rest"? Certainly many languages are Turing equivalent; the current phrasing in the article is misleading at best. I haven't changed it because I'm not as familiar with LC as I should be -- but would a CS person care to comment? zowie 19:26, 2 May 2005 (UTC)
- It is not accurate, in (at least) the following ways:
- The lambda calculus is not a programming paradigm. Nobody programs in the lambda calculus. (No, Lisp is not the lambda calculus.)
- A programming paradigm is not the same sort of thing as a notation for functions or algorithms -- it has as much to do with the way problems are analyzed as with the operations available to perform calculations.
- The way in which the lambda calculus is described as "standing above all the rest" is not in any sense unique to it. Many notations are Turing-complete, not just lambda.
- Turing-completeness has in any regard to do with equivalence to a Turing machine, not to lambda calculus. So if any notation were to be described as "standing above the rest" on this basis it would be Turing machines! But of course the point is that none are "above" the others if they are equivalent.
- For these reasons I'm removing the claim. --FOo 01:50, 3 May 2005 (UTC)
I think there's a fundamental disconnect with this article and it starts with piece on lambda calculus. There is need of a bridge between the historical work and computing languages: Ada Byron developed some notation for the algorithmic computing, so programming paradigms should trace back at least to her. In 1963, John McCarthy wrote a seminal paper A basis for a mathematical theory of computation found In Computer Programming and formal systems. North-Holland. McCarthy's paper is a bridge from what we have today and the Church, Turing, Kleene work. McCarthy's basic argument was that recursive functions were the natural setting. Denotational semantics is the natural outgrowth of McCarthy's ideas by way of Strachey and Scott.
Not a sentence
First line: A programming paradigm is a paradigmatic style of programming... THIS IS NOT A MEANINGFUL SENTENCE. Someone change it.
I removed the claim that C++ is designed to support AOP and "object-based programming". C++ isn't /designed for/ AOP (but may support it) and object-based programming seems like a loose term for object-oriented programming (already listed).
I removed the claim that Scheme is designed to support one particular paradigm. It supports virtually *all* known paradigms. It is biased towards functional programming, but this seems fine: Python and Ruby are as well biased (towards OO). And by the very tiny R^nRS and IEEE standards there are at least two direct supported programming paradigms from standard (functional and imperative). Scheme being extensible, we may take OO, logic programming and other common paradigms for granted, because they really are embedded in the language by most implementations. --184.108.40.206 22:09, 5 July 2007 (UTC)
Possibly because Literate Programming is more a style, or philosophy of programming, than a paradigm. I've always understood a paradigm to be more of a conceptual lens through which to understand a program, a "formal model" of what a program is. Literacy is a quality that one should strive for in their code. Literate programs can (and should!) be written in any paradigm. Mogunus (talk) 04:10, 26 March 2008 (UTC)
- It's not always easy to tell whether material was copied from or to another website; in this case I suspect there may be a problem, since the linked text is not in the form of a Wikipedia article. Please raise this issue at Wikipedia:Copyright problems. Dcoetzee 21:36, 23 January 2009 (UTC)
Suggestions for improvement
Suggested improvement to the History section
It looks to me like the History section has become a bit tangled up do to a confusion between paradigms and languages. For example, I don't think that assembly language is a paradigm. It's entirely possible to write assembly code using any paradigm imaginable. It might not be elegant or productive, but it's possible. I've personally written code that shoe-horned an OO paradigm into ANSI C, a language listed as "procedural." It wasn't pleasant or pretty, but it solved the problem at hand better than any alternative I could come up with. I think that this confusion may have driven the long defense of assembly language in this section. It seems out of place, but I think I understand why someone felt the need to put it there. Nobody likes to see his favorite language under attack as outdated, particularly by someone who seems to know far less about the subject than he does. Before I jump in and attempt to rewrite the section in a way that clearly separates paradigm from language and avoids the appearance of declaring one paradigm fundamentally superior to another, I'd like to see if anyone objects or has other comments or ideas. Anyone? --Mike Duskis (talk) 17:12, 15 October 2009 (UTC)
"General-purpose programming languages" points here - WTF?
Some wiki nimrod, in their infinite ignorance, merged "general-purpose programming language" into domain-specific language (reasoning in elegant and pointless germanic logic that they were opposites and therefore obviously mergeable). This led to a circular reference, since the domain-specific language page was one of the main wiki pages referencing "general-purpose programming languages" (seriously, the wiki Vogons have got to learn how to proofread and check their changes... they aren't Gods, despite their personal notions).
Someone later fixed the circular link by linking "general-purpose programming language" to "programming paradigm" -- here.
But a "general-purpose programming language" is really just the opposite of a special-purpose programming language -- they exist in a two-state universe, i.e., general-purpose vs. special-purpose. They are NOT programming paradigms, but rather types of programming languages.
"General-purpose" means applicable to solving general problems. This would be the general class of most programming languages, like Fortran or Haskell.
"Special-purpose" means designed to solve a smaller set of problems in a well-defined context. For example, SAS is a language for writing statistics applications.
Yes, yes, we could have arguments about the language beasts that appear as general-purpose to one set of blind men (PHP), and as special-purpose to another set of blind men (PHP). You could probably do this for every programming language ever invented -- Fortran is for scientific formulas, Cobol is for business apps, Haskell is for humoring mathematicians, etc. etc.
In the previous section it was stated: "It looks to me like the History section has become a bit tangled up due to a confusion between paradigms and languages". This was in regard to sticking Assembly Language under "programming paradigms". This is the same problem -- you can cut the computer/software engineering cake many different ways... but some of the pieces from different cuttings just aren't comparable or even in opposition, they really cover different or overlapping topics and issues.
Computer languages are related to programming paradigms, but they are not paradigms in and of themselves. Computer languages are an implementation detail. A programming paradigm supports the big picture. How are we going to solve this problem? Not, with what gizmo are we going to solve it? Programming Paradigm equals Method. Computer Language equals Gizmo.
Some gizmos are high-level, some are low-level (like Assembly Language). Some gizmos are general-purpose, able to solve many types of problems, and some are special-purpose, most useful when trying to solve a much smaller set of specialized problems. But a gizmo is what you solve a problem with, it is not the method used to solve the problem. We need water. We dig a well. Digging a well is a paradigm. A post-hole digger is not a paradigm, even if it can be used for digging wells.
If the word Gizmo bothers you, substitute the word Tool instead.
When you hire your so-called computer expert from some WikiProject, hopefully he/she will know their ass from their elbow and will straighten out this mess.
Impolite but largely correct
While I have to object to the general tone of the anonymous comment above, I agree with most of the analysis. I think it underscores the point I made in the previous comment. We should make an effort separate programming language from programming paradigm. If anything, the article only deepens the confusion. Mike Duskis (talk) 19:49, 10 January 2010 (UTC)
Thank you, Mike
Rather than impolite, I like to think of my comments above as "tough love".
I reacted to the top of the page comments
I understand the Wiki remarks about "citations for verification" and "needs attention from an expert in Computer science" The remarks and the replying angst reminds me how difficult it can be to compose the best English communication for ideas. The great number of programming paradigms means investing time for researching and integrating with the Wiki's articles and its portals. It will happen but over a long span of time. - Cheers, John S Woler (talk) 21:16, 30 January 2013 (UTC)
Is multi-paradigm a paradigm?
I have serious reservations about the usefulness of this term. For one, almost every language out there is a fusion of ideas and approaches; ergo multi-paradigm in some sense. And secondly, to say a language is multi-paradigm doesn't really tell you anything about the language. If you asked someone what kind of language Ruby is and they said "Ruby is multi-paradigm" you wouldn't go "Ahh, right, that's interesting," you'd go "OK. Which paradigms?"
My main objective in making this point is to remove "multi-paradigm" qualification from paradigm section of those side-info boxes on each programming language. The article of multi-paradigm itself serves as a definition for the term which may be useful to someone expressly seeking it out. Ruby is a particularly bad example as the side-info box lists Ruby's paradigm as "multi-paradigm" and nothing else, which tells you virtually nothing.
Another option is to limit our usage of the multi-paradigm term to those languages that merge the most significant paradigms especially where those paradigms are not normally seen together. For instance OCaml is an interesting merge of object-oriented and functional paradigms but a language that merges OOP and reflective really isn't interesting because many OO languages have reflective features. Oligomous (talk) 13:40, 4 March 2010 (UTC)
Agreed, multi-paradigm as a label is meaningless. We should change the sidebox heading "Paradigm" to "Paradigms" and then just list the paradigms. Multi-paradigm isn't a paradigm. Language to paradigm is a one-to-many relationship.
Regarding reflective features: I think what you're arguing is whether or not "reflective" is a paradigm. I say the notion of paradigm is pretty ambiguous - it pretty much means "consistent collection of language features enabling related idioms", which could be just about anything. So I think it's fair, if someone thinks of something as a paradigm, to let them call it a paradigm, and put it in the list. Qseep (talk) 22:48, 22 February 2011 (UTC)
When is a paradigm not a paradigm?
The articles states "A programming paradigm is a fundamental style of computer programming," and I agree. But, despite that definition, there seems to be a number of things listed as paradigms that I wouldn't consider so. For instance, is metaprogramming a "fundamental style of computer programming"? I'd say it's a style or with an associated collection of features and ideas. I know there were some esoteric languages created that exhibited aspects (as in aspect-oriented metaprogramming) as their primary means of abstraction (in opposition to objects, say) but these didn't work very well.
Whilst I like all these articles—reading about agent-oriented, intentional, or reflective programming is interesting—I'm hesitant to refer to them as paradigms when paradigms are fundamental styles or programming. Could they not be better classified as approaches to software construction or simply programming styles? Oligomous (talk) 13:55, 4 March 2010 (UTC)
"Style" is probably better than "paradigm". I think it's a historical accident that they're called "paradigms". Someone wanted to emphasize how much different their language was from others, so they labeled some subset of features a "fundamental paradigm" so they could market it better. Languages tend to become known by their distinctions more than their similarities. For example, most C++ looks exactly like C, but we say C is "procedural" and C++ is "object-oriented". It's what's different about the two languages that's deemed important.
In fact, look at the page for [Generic_programming]... it doesn't even call itself a paradigm. It calls itself a style. That sounds right to me.
What's happened these days is that the languages that were supposed to represent a single paradigm (Lisp, Prolog, Smalltalk, etc.) have been mixed and matched in so many ways into so many other languages, that every language is a mutt. Not to mention the additional styles that have been developed but haven't been seen to represent a whole language. Qseep (talk) 23:00, 22 February 2011 (UTC)
The Intro does not meet Wiki standards
The intro should be a jargon-free, self contained summery (or definition) of the whole topic. The sentence; "Paradigms differ in ..." seems premature since the term has not yet been defined/solidified. (Should it even be in the lead?) Focus: Making true statements about a subject is not similar to a definition/explanation. Suggest: Wikipedia:Manual of Style (lead section).
--220.127.116.11 (talk) 23:53, 27 May 2011 (UTC)Doug Bashford
- The intro is short in being a complete overview and should include a summary of the article sections, but I don't think that sentence in particular is problematic. It's being used as an language-economic way to say "paradigms use concepts and abstractions to represent the elements [...] and steps [...] with each paradigm having a different collection of those"; which is a way to define the concept by signaling its primary properties. Diego Moya (talk) 15:01, 28 May 2011 (UTC)
Haskell is single-paradigm ?
I beg to differ. Since Haskell implements an extremely flexible system for extension / APIs, you can effectively layer other paradigms in as domain specific languages.
I've always thought that the definition
- A multi-paradigm programming language is a programming language that supports more than one programming paradigm
is malformed, since it's up to the programmer to decide what paradigmatic methodology to use. Since I wrote a LISP interpreter in C, then by that definition C is a functional programming language and thereby multiparadigm, and if any daredevil decides to implement a Smalltalk in Intercal, then Intercal is object oriented. Such a definition collapses by including every programming language, and must therefore be rejected for overlapping the concept of Turing-completeness.
Instead I believe a usable definition of multi-paradigm programming language must describe the base design, excluding the extra adaptions for differing programming styles. Rursus dixit. (mbork3!) 13:28, 14 December 2012 (UTC)
- Besides, I regard C-sharp as imperative-solely, and F-sharp as functional-solely, building on the traditions of imperative-solely Java and functional-solely SML. Every modern imperative and modern functional PL has objects. Leda is another story. Rursus dixit. (mbork3!) 13:32, 14 December 2012 (UTC)
The list of programming paradigms has no valid source, but instead a HTML comment explains its source to be Template:Programming paradigms!! Which means a process where any editors random (mis)comprehension of the word "paradigm" authors Wikipedia. Also, consider Wikipedia as the academic source for Wikipedia (Wikipedia:Wikipedia is not a reliable source)! I want some list of programming paradigms out there. I know there are. Rursus dixit. (mbork3!) 21:11, 26 December 2012 (UTC)
C++ is not OOP accordingly to the creator of Object-Oriented Programming
Consider C++ to be removed, as C++ is not a representative of an Object-Oriented Programming Language, accordingly to Alan Kay, the creator of the paradigm. If no objections, I will remove it. — Preceding unsigned comment added by Hernan mvs (talk • contribs) 11:25, 15 February 2013 (UTC)
I think it is over the top to remove C++ from the list. C++ may along with others need to have better descriptions as to their included paradigms' characteristics. I can't say I find that any language using any paradigm is a pure version of an idea. C++, Java, C#, and others are at best procedural and object-oriented hybrids from the C-language. That does not mean they can't be described as being object-oriented. I suggest improving ways to describe various paradigms and the ways languages include paradigms'ideas. - Cheers, John S Woler (talk) 20:44, 15 February 2013 (UTC)
I don't see symbolic programming anywhere in the article or its template. And it's hard to find it mentioned in other programming pages, even though source says it applies to Lisp and Prolog. Where should it go? Abstractematics (talk) 18:53, 20 November 2013 (UTC)
- Hello there! That'a a great addition, already went ahead and mentioned symbolic programming in the lead section. It should be further described within the "History" section. -- Dsimic (talk) 19:24, 20 November 2013 (UTC)