Comparison of programming languages: Difference between revisions

Content deleted Content added
Forth, as a pure procedural language, cannot be considered as functional. Its "words" are procedures operating on stacks and other memory, every function must be expressed explicitly as a procedure operating on stack.
Citation bot (talk | contribs)
Added date. | Use this bot. Report bugs. | Suggested by Jay8g | #UCB_toolbar
 
(21 intermediate revisions by 13 users not shown)
Line 15:
<!-- Per [[WP:REPEATLINK]]: Wikilink terms on 1st instance only, remove later repeat links. -->
{{sticky header}}
{{sort-under}}
{|class="wikitable sortable sort-under sticky-header" style="text-align:center;"
|-
! scope="col" | Language
Line 61 ⟶ 62:
| <!-- Generic --> {{yes}}<ref>[http://www.adaic.org/standards/05rm/html/RM-TTL.html Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3], [http://www.adaic.org/standards/05rm/html/RM-12.html Section 12: Generic Units]</ref>
| <!-- Reflective --> {{no}}
|<!-- Other paradigms -->[[concurrent programming language|Concurrent]],<ref>[http://www.adaic.org/standards/05rm/html/RM-TTL.html Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3], [http://www.adaic.org/standards/05rm/html/RM-9.html Section 9: Tasks and Synchronization]</ref> [[distributed programming|distributed]]<ref>[http{{Cite web|url=https://www.adaic.org/resources/add_content/standards/05rm/html/RM-TTLE.html|title=Distributed Ada Reference Manual, ISO/IEC 8652:2005(E) Ed. 3] [http://Systems|website=www.adaic.org/standards/05rm/html/RM-E.html Annex E: Distributed Systems]}}</ref>
| <!-- Standardized? --> {{yes}}<br/>1983, 2005, 2012, ANSI, ISO, [[GOST]] 27831-88<ref>{{Cite web |url=http://vak.ru/lib/exe/fetch.php/book/gost/pdf/gost-27831-88.pdf |title=Vak.ru |access-date=2008-08-09 |archive-url=https://web.archive.org/web/20170330020459/http://vak.ru/lib/exe/fetch.php/book/gost/pdf/gost-27831-88.pdf |archive-date=2017-03-30 |url-status=dead}}</ref>
 
Line 98 ⟶ 99:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms -->
| <!-- Standardized? --> {{yes}}<br/>1960, [[IFIP WG 2.1]], ISO<ref>[http{{Cite web|url=https://www.open-std.org/jtc1/sc22/docs/oldwgs/wg6.html |title=ISO/IEC 1538:1984]JTC1/SC22/WG6 - Algol|website=www.open-std.org}}</ref>
 
|-
Line 146 ⟶ 147:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> Any, syntax is usually highly specific, related to the target processor
| <!-- Standardized? --> {{yes}}<br/>1985 IEEE 694-1985<ref>[{{Cite web|url=https://standards.ieee.org/ieee/694/950/|title=IEEE Standards Association|website=IEEE 694-1985]Standards Association}}</ref>
 
|-
Line 152 ⟶ 153:
| <!-- Original purpose --> GUI automation ([[Macro (computer science)#Application macros and scripting|macros]]), highly ___domain-specific
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{yes}}<br/><ref>[{{Cite web|url=https://www.autohotkey.com/docs/Objects.htm |title=Objects - Definition & Usage]}}</ref>
| <!-- Functional --> {{no}}
| <!-- Procedural --> {{yes}}
Line 218 ⟶ 219:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms -->
| <!-- Standardized? --> {{no}}<br/>In progress, [[Java Community Process|JCP]]<ref>[http{{Cite web|url=https://jcp.org/en/jsr/detail?id=274|title=The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 274]|website=jcp.org}}</ref>
 
|-
Line 258 ⟶ 259:
|-
! scope="row" | [[C (programming language)|C]]
| <!-- Original purpose --> Application, system,<ref>[{{Cite web|url=https://www.bell-labs.com/usr/dmr/www/chist.html |title=Chistory|website=www.bell-labs.com]}}</ref> general purpose, low-level operations
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{no}}
Line 266 ⟶ 267:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms -->
| <!-- Standardized? --> {{yes}}<br/>1989, [[ANSI C|ANSI C89, ISO/IEC C90, ISO/IEC C95, ISO/IEC C99, ISO/IEC C11, ISO/IEC C17, ISO/IEC C2x]]<ref>[http{{Cite web|url=https://www.open-std.org/JTC1/SC22/WG14/ ANSI C89, |title=ISO/IEC 9899:1990,JTC1/SC22/WG14 1999,- 2011, 2018]C|website=www.open-std.org}}</ref>
 
|-
Line 276 ⟶ 277:
| <!-- Procedural --> {{yes}}
| <!-- Generic --> {{yes}}
| <!-- Reflective --> {{noyes}}
| <!-- Other paradigms --> Concurrent
| <!-- Standardized? --> {{yes}}<br/>1998, [[C++#Standardization|ISO/IEC C++98, ISO/IEC C++03, ISO/IEC C++11, ISO/IEC C++14, ISO/IEC C++17, ISO/IEC C++20, ISO/IEC C++23, ISO/IEC C++26]]<ref>[http{{Cite web|url=https://www.open-std.org/JTC1/SC22/WG21/ |title=ISO/IEC 14882:1998,JTC1/SC22/WG21 2003,- 2011,The 2014,C++ 2017,Standards 2020]Committee - ISOCPP|website=www.open-std.org}}</ref>
 
|-
Line 285 ⟶ 286:
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{yes}}
| <!-- Functional --> {{yes}}<ref>[{{Cite web|url=http://www.codeproject.com/KB/cs/intro_functional_csharp.aspx |title=Codeproject.com: Functional Programming in C# 3.0 using Lambda Expression]}}</ref>
| <!-- Procedural --> {{yes}}
| <!-- Generic --> {{yes}}
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> StructuredConcurrent, concurrentstructured
| <!-- Standardized? --> {{yes}}<br/>2000, ECMA, ISO<ref>ECMA-334; ISO/IEC 23270:2006</ref>
 
Line 297 ⟶ 298:
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{yes}}
| <!-- Functional --> {{yes}}<ref>[http{{Cite web|url=https://www.softvelocity.com/|title=Clarion Softvelocity- Home|website=www.softvelocity.com]}}</ref>
| <!-- Procedural --> {{no}}
| <!-- Generic --> {{no}}
Line 422 ⟶ 423:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> [[lazy evaluation]], non-determinism
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via Curry Language Report
 
|-
Line 470 ⟶ 471:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms -->
| <!-- Standardized? --><br/>? {{unknown}}
 
 
Line 490 ⟶ 491:
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{yes}}
| <!-- Functional --> {{yes}}<ref>[http{{Cite web|url=https://se.inf.ethz.ch/~meyer/publications/online/eiffel/basic.html#Agents|title=Bertrand Meyer: Basic Eiffel language mechanisms]|website=se.inf.ethz.ch}}</ref><ref>[[Closure (computer programming)#Inline agents .28Eiffel.29:|Closure (computer programming)]]</ref>
| <!-- Procedural --> {{no}}
| <!-- Generic --> {{yes}}
Line 657 ⟶ 658:
| <!-- Original purpose --> Application, web, server-side
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{maybe|Can be viewed as}}<ref>[{{Cite web|url=https://golanggo.orgdev/doc/faq#Is_Go_an_object|title=Frequently Asked Questions (FAQ) -oriented_language The Go Programming Language (FAQ)]|website=go.dev}}</ref>
| <!-- Functional --> {{maybe|Can be viewed as}}<ref>{{Cite web |url=https://go.dev/doc/codewalk/functions/ |title=Codewalk: First-Class Functions in Go |quote=Go supports first class functions, higher-order functions, user-defined function types, function literals, closures, and multiple return values. This rich feature set supports a functional programming style in a strongly typed language.}}</ref>
| <!-- Procedural --> {{yes}}
Line 663 ⟶ 664:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> Concurrent
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via Go Language Specification
 
|-
Line 699 ⟶ 700:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> Meta-programming
| <!-- Standardized? --> {{no|}}<br/>In progress}}, [[Java Community Process|JCP]]<ref>[http{{Cite web|url=https://jcp.org/en/jsr/detail?id=241|title=The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 241]|website=jcp.org}}</ref>
 
|-
Line 819 ⟶ 820:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> Concurrent
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via Java Language Specification
 
|-
Line 831 ⟶ 832:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> [[prototype-based]]
| <!-- Standardized? --> {{yes}}<br/>1997-2022, [[ECMA-262]] standard
 
|-
Line 861 ⟶ 862:
| <!-- Original purpose --> General, technical computing
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{maybe|Can be viewed as}}<ref>{{Cite web |url=https://medium.com/@abhimanyuaryan/object-oriented-programming-in-julia-4dbde2661fde|title=Object-Oriented programming in julia|date=4 June 2023 |quote= in Julia, Oriented programming is not the primary focus, instead it emphasizes multiple dispatches, a more general concept. Despite this, OOP can still be achieved in Julia through the use of composite types and methods.}}</ref><ref>{{Cite web |url=https://dev.to/acmion/julia-object-oriented-programming-5dgh |title=Julia Object Oriented Programming |date=29 May 2021 |quote=Julia does only partially support object oriented programming (OOP) }}</ref>
| <!-- Object-oriented --> {{no}}
| <!-- Functional --> {{yes}}
| <!-- Procedural --> {{yes}}
Line 867 ⟶ 868:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> Multiple dispatch, meta, scalar and array-oriented, parallel, concurrent, distributed ("cloud")
| <!-- Standardized? --> {{maybe|De facto}}<br/>standard via Julia Documentation<ref>{{Cite web|url=https://docs.julialang.org/en/v1/|title=Julia Documentation · The Julia Language|website=docs.julialang.org}}</ref>
| <!-- Standardized? --> {{no}}
 
|-
Line 883 ⟶ 884:
|-
! scope="row" | [[Kotlin (programming language)|Kotlin]]
| <!-- Original purpose --> Application, general, mobile development, server-side, client-side, web, scripting<ref>{{Cite web|url=https://github.com/Kotlin/kotlin-script-examples/blob/master/jvm/main-kts/MainKts.md|title=kotlin-script-examples/jvm/main-kts/MainKts.md at master · Kotlin/kotlin-script-examples|website=GitHub}}</ref>, ___domain-specific<ref>{{Cite web|url=https://kotlinlang.org/docs/type-safe-builders.html|title=Type-safe builders &#124; Kotlin|website=Kotlin Help}}</ref>
| <!-- Original purpose --> Application, mobile development, server-side, client-side, web
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{yes}}
Line 890 ⟶ 891:
| <!-- Generic --> {{yes}}
| <!-- Reflective --> {{yes}}<ref>{{cite web |url=http://blog.jetbrains.com/kotlin/2014/07/m8-is-out/ |title=M8 is out! |date=2 July 2014 |quote=As a first peek into the future reflective capabilities of Kotlin, you can now access properties as first-class objects in Kotlin}}</ref>
| <!-- Other paradigms --> Concurrent<ref>{{Cite web|url=https://kotlinlang.org/docs/coroutines-overview.html|title=Coroutines &#124; Kotlin|website=Kotlin Help}}</ref>
| <!-- Other paradigms -->
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via Kotlin Language Specification
 
|-
Line 903 ⟶ 904:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> Several variants, custom programmable, dynamic loadable modules
| <!-- Standardized? --> {{maybe|Optionally}}<br/>[[POSIX.2]]<ref name="POSIX 1003">[[POSIX.2]], Shell and Utilities, Command Interpreter (IEEE Std 1003.2-1992.)</ref>
 
|-
Line 963 ⟶ 964:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> Scripts exist in in-world objects
| <!-- Standardized? --> {{maybe|De facto}} <br/>reference is the [[Second Life]] implementation of [[Linden Scripting Language|LSL]].<ref>Halcyon (Inworldz) and Open Sims propose compatible implementations with additional functions.</ref>
 
|-
Line 1,203 ⟶ 1,204:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms -->
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via language specification and Requests for Comments (RFCs)
 
|-
Line 1,239 ⟶ 1,240:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> [[Concatenative programming language|Concatenative]], [[Stack-oriented programming|stack-oriented]]
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via the PostScript Reference Manual<ref>{{Cite web |url=https://www.adobe.com/products/postscript/pdfs/PLRM.pdf |title=PostScript Language Reference Manual |access-date=2017-02-18 |archive-url=https://web.archive.org/web/20170218093716/https://www.adobe.com/products/postscript/pdfs/PLRM.pdf |archive-date=2017-02-18 |url-status=dead}}</ref>
 
|-
Line 1,287 ⟶ 1,288:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> Aspect-oriented
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via Python Enhancement Proposals (PEPs)
 
|-
Line 1,401 ⟶ 1,402:
| <!-- Original purpose --> Application, server-side, system, web
| <!-- Imperative --> {{yes}}
| <!-- Object-oriented --> {{yesmaybe|Can be viewed as}}<ref>[{{Cite web|url=https://doc.rust-lang.org/book/ch17-00-oop.html Is Rust an |title=Object-Oriented Programming Language?]Features|website=doc.rust-lang.org}}</ref>
| <!-- Functional --> {{yes}}
| <!-- Procedural --> {{yes}}
Line 1,407 ⟶ 1,408:
| <!-- Reflective --> {{no}}<ref>{{cite book |last1=Klabnik |first1=Steve |last2=Nichols |first2=Carol |title=The Rust Programming Language |url=https://doc.rust-lang.org/book/title-page.html |chapter=Macros |chapter-url=https://doc.rust-lang.org/book/ch19-06-macros.html}}</ref>
| <!-- Other paradigms --> Concurrent
| <!-- Standardized? --> {{nomaybe|De facto}} standard by the official Rust releases
 
|-
Line 1,443 ⟶ 1,444:
| <!-- Reflective --> {{yes}}
| <!-- Other paradigms --> Data-oriented programming, metaprogramming
| <!-- Standardized? --> {{maybe|De facto}} <br/>standard via Scala Language Specification (SLS)
 
|-
Line 1,455 ⟶ 1,456:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> meta, extensible-syntax
| <!-- Standardized? --> {{maybe|De facto}}<br/>1975-2013, R<sup>0</sup>RS, R<sup>1</sup>RS, R<sup>2</sup>RS, R<sup>3</sup>RS, R<sup>4</sup>RS, R<sup>5</sup>RS, R<sup>6</sup>RS, R<sup>7</sup>RS Small Edition<ref>[{{Cite web|url=https://standards.scheme.org/|title=Scheme R<sup>3</sup>RS, R<sup>4</sup>RS, R<sup>5</sup>RS, R<sup>6</sup>RS, R<sup>7</sup>RS Small Edition]Standards|website=standards.scheme.org}}</ref><ref>[{{Cite web|url=https://standards.scheme.org/early/|title=Scheme R<sup>0</sup>RS, R<sup>1</sup>RS, R<sup>2</sup>RS]Standards|website=standards.scheme.org}}</ref>
 
|-
Line 1,527 ⟶ 1,528:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms -->
| <!-- Standardized? --> {{yes}}<br/>1997, SML '97<ref>[{{Cite web|url=http://www.smlnj.org/sml97.html|title=SML SMLNJ'97|website=www.smlnj.org]}}</ref>
 
|-
Line 1,695 ⟶ 1,696:
| <!-- Reflective --> {{no}}
| <!-- Other paradigms --> Loadable modules
| <!-- Standardized? --> {{maybe|Optionally}}<br/>[[POSIX.2]]<ref name="POSIX 1003">[[POSIX.2]], Shell and Utilities, Command Interpreter (IEEE Std 1003.2-1992.)</ref>
|}
 
Line 1,706 ⟶ 1,707:
Some (mostly older) languages require that programmers explicitly add checks for these kinds of errors. Psychologically, different [[List of cognitive biases|cognitive biases]] (e.g., [[optimism bias]]) may affect novices and experts alike and lead them to skip these checks. This can lead to [[software bug|erroneous behavior]].
 
'''Failsafe I/O''' is a feature of [[1C:Enterprise programming language|1C:Enterprise]], [[Ada (programming language)|Ada]] (exceptions), [[ALGOL]] (exceptions or return value depending on function), [[Ballerina (programming language)|Ballerina]], [[C Sharp (programming language)|C#]], [[Common Lisp]] ("conditions and restarts" system), [[Curry (programming language)|Curry]], [[D (programming language)|D]] (throwing on failure),<ref>{{Cite web|url=https://dlang.org/phobos/std_stdio.html|title=STDstd.stdio - D Programming Language|website=dlang.org}}</ref> [[Erlang (programming language)|Erlang]], [[Fortran]], [[Go (programming language)|Go]] (unless result explicitly ignored), [[Gosu (programming language)|Gosu]], [[Harbour (programming language)|Harbour]], [[Haskell]], [[ISLISP]], [[Java (programming language)|Java]], [[Julia (programming language)|Julia]], [[Kotlin (programming language)|Kotlin]], [[LabVIEW]], [[Mathematica]], [[Objective-C]] (exceptions), [[OCaml]] (exceptions), [[OpenLisp]], [[PHP]], [[Python (programming language)|Python]], [[Raku (programming language)|Raku]], [[Rebol]], [[Rexx]] (with optional '''signal on'''... trap handling), [[Ring (programming language)|Ring]], [[Ruby (programming language)|Ruby]], [[Rust (programming language)|Rust]] (unless result explicitly ignored), [[Scala (programming language)|Scala]],<ref>Scala runs on the Java Virtual Machine from which it inherits the runtime exception handling.</ref> [[Smalltalk]], [[Standard ML]] {{citation needed|date=February 2011}}, [[Swift (programming language)|Swift ≥ 2.0]] (exceptions), [[Tcl]], [[Visual Basic (classic)|Visual Basic]], [[Visual Basic (.NET)|Visual Basic .NET]], [[Visual Prolog]], [[Wolfram Language]], [[Xojo]], [[XPath]]/[[XQuery]] (exceptions), and [[Zeek]].
 
'''No Failsafe I/O''':