Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Operator overloading
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
==Catalog== A classification of some common programming languages is made according to whether their operators are overloadable by the programmer and whether the operators are limited to a predefined set. {| class="wikitable" |- ! Operators ! Not overloadable ! Overloadable |- ! New definable<ref>Completely new operators can be added.</ref> | <!-- "Not overloadable" and "New operators definable" --> *[[ML (programming language)|ML]] *[[Pico (programming language)|Pico]]<ref>Binary functions with a symbolic name can be called infix.</ref> *[[Prolog]]<ref>{{cite web |url=https://www.swi-prolog.org/pldoc/man?predicate=op/3 |title=Predicate op/3}}</ref> |<!-- "Overloadable" and "New operators definable" --> *[[ALGOL 68#op: Operators|ALGOL 68]] *[[Clojure]] *[[Eiffel (programming language)|Eiffel]]<ref>{{Cite web|title=Bertrand Meyer: Basic Eiffel language mechanisms|url=http://se.ethz.ch/~meyer/publications/online/eiffel/basic.html|access-date=2021-04-07|website=se.ethz.ch}}</ref> *[[Fortran]]<ref>{{Cite web|title=Operator functions in F90|url=http://www.mathcs.emory.edu/~cheung/Courses/561/Syllabus/6-Fortran/operators.html|access-date=2021-04-07|website=www.mathcs.emory.edu}}</ref><ref>Introduced in Fortran 90.</ref> *[[Futhark (programming language)|Futhark]]<ref>{{Cite web|title=3. Language Reference β Futhark 0.19.0 documentation|url=https://futhark.readthedocs.io/en/latest/language-reference.html|access-date=2020-10-10|website=futhark.readthedocs.io}}</ref> *[[F Sharp (programming language)|F#]]<ref name="Smith2012">{{cite book |last=Smith |first=Chris |title=Programming F# 3.0: A Comprehensive Guide for Writing Simple Code to Solve Complex Problems |url=https://books.google.com/books?id=e0Wl6id4unQC&q=%22operator+overloading%22 |date=9 October 2012 |publisher=O'Reilly Media, Inc. |isbn=978-1-4493-2604-3}}</ref> *[[Haskell (programming language)|Haskell]]<ref>[[Type class]]es instead of overloading.</ref> *[[Io (programming language)|Io]]<ref>{{Cite web|title=io guide|url=https://iolanguage.org/guide/guide.html#Syntax-Operators|access-date=2021-04-07|website=iolanguage.org}}</ref> *[[Julia (programming language)|Julia]]<ref>{{Cite web|title=Operator Overloading in Julia|url=https://www.geeksforgeeks.org/operator-overloading-in-julia/|access-date=2025-03-14 |website=geeksforgeeks.org}}</ref> *[[Nim (programming language)|Nim]]<ref>{{cite web|title=Operators|url=https://nim-lang.github.io/Nim/tut1.html#procedures-operators}}</ref> *[[R (programming language)|R]]<ref>{{Cite web|title=Operators - R in a Nutshell, 2nd Edition [Book]|url=https://www.oreilly.com/library/view/r-in-a/9781449358204/ch06s02.html|access-date=2021-04-07|website=www.oreilly.com|language=en}}</ref> *[[Raku (programming language)|Raku]]<ref>{{cite web |url=https://docs.raku.org/language/optut |title=Creating operators}}</ref> *[[Scala (programming language)|Scala]]<ref>{{cite web |url=https://docs.scala-lang.org/tour/operators.html |website=Tour of Scala |title=Operators}}</ref> *[[Seed7]]<ref>{{Cite web|title=Seed7 Manual: Structured syntax definition|url=http://seed7.sourceforge.net/manual/syntax.htm|access-date=2020-09-29|website=seed7.sourceforge.net}}</ref> *[[Smalltalk]]<ref name="Hunt2012">{{cite book |last=Hunt |first=John |title=Smalltalk and Object Orientation: An Introduction |url=https://books.google.com/books?id=BiDUBwAAQBAJ&q=overloading+operators |date=6 December 2012 |publisher=Springer Science & Business Media |isbn=978-1-4471-0961-7}}</ref> *[[Swift (programming language)|Swift]]<ref>{{cite web |url=https://docs.swift.org/swift-book/LanguageGuide/AdvancedOperators.html |title=Swift: Advanced Operators}}</ref> |- ! Limited set |<!-- "Not overloadable" and "Limited set of operators" --> *[[BASIC]] *[[C (programming language)|C]] *[[Go (programming language)|Go]]<ref>{{cite web |title=Why does Go not support overloading of methods and operators? |url=http://golang.org/doc/go_faq.html#overloading |access-date=4 September 2011}}</ref> *[[Java (programming language)|Java]] *[[JavaScript]] *[[Modula-2]] *[[Objective-C]] *[[Pascal (programming language)|Pascal]]<ref>{{Cite web|title=Introduction|url=https://www.freepascal.org/docs-html/ref/refse101.html#x213-23500015.1|access-date=2020-09-30|website=freepascal.org}}</ref> *[[TypeScript]]<ref>{{cite web |title=Operator Overloads |website=[[GitHub]] |url=https://github.com/Microsoft/TypeScript/issues/5407 |access-date=28 September 2018}}</ref> *[[Visual Basic]] |<!-- "Overloadable" and "Limited set of operators" --> *[[Ada (programming language)|Ada]]<ref>{{cite web |url=https://www.adaic.org/resources/add_content/standards/05aarm/html/AA-6-6.html |website=Annotated Ada Reference Manual |title=6.6 Overloading of Operators}}</ref> *[[C Sharp (programming language)|C#]]<ref name="DraytonAlbahari2003">{{cite book |last1=Drayton |first1=Peter |last2=Albahari |first2=Ben |last3=Neward |first3=Ted |title=C# in a Nutshell |url=https://books.google.com/books?id=bG_Aqb6iOUYC&q=%22operator+overloading%22 |year=2003 |publisher=O'Reilly Media, Inc. |isbn=978-0-596-00526-9}}</ref> *[[C++]]<ref>{{cite web |url=https://en.cppreference.com/w/cpp/language/operators |title=C++ Operator Overloading}}</ref> *[[Ceylon (programming language)|Ceylon]]<ref>{{Cite web|title=Eclipse Ceylon: Operator Polymorphism|url=https://ceylon-lang.org/documentation/1.3/reference/operator/operator-polymorphism/|access-date=2021-04-07|website=ceylon-lang.org}}</ref> *[[D (programming language)|D]]<ref>{{Cite web|title=Operator Overloading - D Programming Language|url=https://dlang.org/spec/operatoroverloading.html|access-date=2020-10-10|website=dlang.org}}</ref> *[[Dart (programming language)|Dart]]<ref>{{Cite web|title=A tour of the Dart language|url=https://dart.dev/guides/language/language-tour|access-date=2020-09-30|website=dart.dev}}</ref> *[[FreeBASIC]]<ref>{{Cite web|title=Operator Overloading|url=http://bourabai.kz/einf/freebasic/ProPgOperatorOverloading.html|access-date=2021-04-07|website=bourabai.kz}}</ref> *[[Groovy (programming language)|Groovy]]<ref>{{Cite web|title=The Apache Groovy programming language - Operators|url=https://groovy-lang.org/operators.html#Operator-Overloading|access-date=2020-09-30|website=groovy-lang.org}}</ref> *[[Kotlin (programming language)|Kotlin]]<ref>{{cite web |title=Operator overloading |url=https://kotlinlang.org/docs/reference/operator-overloading.html |website=Kotlin |access-date=24 June 2018}}</ref> *[[Lua (programming language)|Lua]]<ref>{{cite web |url=http://lua-users.org/wiki/MetamethodsTutorial |title=Metamethods Tutorial |website=Lua-users Wiki}}</ref> *[[MATLAB]]<ref>{{cite web |title=Implementing Operators for Your Class |url=http://www.mathworks.com/help/matlab/matlab_oop/implementing-operators-for-your-class.html |access-date=1 October 2013}}</ref> *[[Object Pascal]] ([[Free Pascal]],<ref>{{cite web |title=Operator Overloading |website=Free Pascal Manual |url=http://www.freepascal.org/docs-html/ref/refch15.html |access-date=1 December 2014}}</ref> [[Delphi (programming language)|Delphi]] (since 2005)<ref>{{cite web |title=Operator Overloading |website=Delphi Manual |url=http://docwiki.embarcadero.com/RADStudio/XE4/en/Operator_Overloading_%28Delphi%29 |access-date=1 December 2014}}</ref>) *[[PHP]] (using magic methods,<ref>{{cite web |title=PHP magic methods overriding class properties |url=http://webwidetutor.com/php/php-oop-Magic-Methods-tutorial-?id=30 |access-date=7 April 2015 |archive-url=https://web.archive.org/web/20160304050243/http://webwidetutor.com/php/php-oop-Magic-Methods-tutorial-?id=30 |archive-date=4 March 2016}}</ref> ArrayAccess interface, or Operator extension) *[[Perl]]<ref name="Orwant2002">{{cite book |last=Orwant |first=Jon |title=Computer Science & Perl Programming: Best of The Perl Journal |url=https://books.google.com/books?id=8TkEOyBHoOoC&q=%22operator+overloading%22&pg=PA347 |date=4 November 2002 |publisher=O'Reilly Media, Inc. |isbn=978-0-596-00310-4 |pages=347β}}</ref> *[[Python (programming language)|Python]]<ref>{{cite web |url=https://docs.python.org/3/reference/datamodel.html |website=The Python Language Reference |title=3. Data Model}}</ref> *[[Ruby (programming language)|Ruby]]<ref>{{cite web |url=https://www.ruby-lang.org/en/documentation/faq/7/ |website=Official Ruby FAQ |title=Methods}}</ref> *[[Rust (programming language)|Rust]]<ref>{{cite web |url=https://doc.rust-lang.org/stable/rust-by-example/trait/ops.html |website=Rust By Example |title=Operator Overloading}}</ref> *[[Visual Basic .NET]]<ref>{{cite web|title=How to: Define an Operator (Visual Basic)|date=15 September 2021 |url=https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-features/procedures/how-to-define-an-operator}}</ref> |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Operator overloading
(section)
Add topic