Protocol (object-oriented programming)

interfaceinterfacesprotocolsprotocolInterface (object-oriented programming)abstract interfacesinterface (computer programming)Interface (object oriented programming)method protocolsprotocol (interface)
Protocol is a term used by particular object-oriented programming languages with a variety of specific meanings, which other languages may term interface or trait.wikipedia
110 Related Articles

Interface (Java)

interfacesinterfaceJava interface
For example, in Java interfaces, the Comparable interface specifies a method compareTo which implementing classes must implement.
They are similar to protocols.

Dart (programming language)

DartDart programming languageECMA-408
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
It supports interfaces, mixins, abstract classes, reified generics, static typing, and a sound type system.

Go (programming language)

GoGo programming languageGolang
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
The second are its interfaces, which provides runtime polymorphism.

Logtalk

Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
As an object-oriented programming language, Logtalk's major features include support for both classes (with optional metaclasses) and prototypes, parametric objects, protocols (interfaces), categories (components, aspects, hot patching), multiple inheritance, public/protected/private inheritance, event-driven programming, high-level multi-threading programming, reflection, and automatic generation of documentation.

Seed7

its own programming-language interpreterTransport Layer Security
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

Racket (programming language)

RacketDrRacketPLT
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
The class system gained features (e.g. Java-style interfaces) and also lost several features (e.g. multiple inheritance) throughout these versions.

Swift (programming language)

SwiftSwift 3Swift programming language
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
Swift supports the concept of protocol extensibility, an extensibility system that can be applied to types, structs and classes, which Apple promotes as a real change in programming paradigms they term "protocol-oriented programming" (similar to traits).

Objective-C

Objective-C++Objective CCategory
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
Objective-C was extended at NeXT to introduce the concept of multiple inheritance of specification, but not implementation, through the introduction of protocols.

C Sharp (programming language)

C#Visual C#C# programming language
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).
Unlike C++, C# does not support multiple inheritance, although a class can implement any number of interfaces.

Clojure

Rich HickeyClojureScriptClojure programming language
Clojure supports multimethods and for interface-like abstractions has a protocol based polymorphism and data type system using records, providing high-performance and dynamic polymorphism designed to avoid the expression problem.

Class (computer programming)

classclassesPartial class
In the terms of type theory, a class is an implementationa concrete data structure and collection of subroutineswhile a type is an interface.

Virtual function

virtualvirtual methodvirtual functions
In C++ interfaces are known as abstract base classes and implemented using pure virtual functions.

Object-oriented programming

object-orientedobject orientedobject-oriented programming language
Protocol is a term used by particular object-oriented programming languages with a variety of specific meanings, which other languages may term interface or trait.

Communication protocol

protocolcommunications protocolprotocols
Protocol when used otherwise is akin to a Communication protocol, indicating the chain of interactions between the caller and the object.

Object (computer science)

objectobjectsdata object
In these languages, a protocol is a common means for discrete objects to communicate with each other.

Method (computer programming)

methodsmethodabstract method
These are definitions of methods and values which the objects agree upon, in order to co-operate, as part of an API.

Java (programming language)

JavaJava programming languageJava language
For example, in Java interfaces, the Comparable interface specifies a method compareTo which implementing classes must implement. Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

Programming language

programming languageslanguagedialect
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

Ada (programming language)

AdaAda programming languageAda 83
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

D (programming language)

DD programming languageD language
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

Object Pascal

DelphiDelphi programming languageDCU
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

PHP

PHP5PDOPHP programming language
Some programming languages provide explicit language support for protocols/interfaces (Ada, C#, D, Dart, Delphi, Go, Java, Logtalk, Object Pascal, Objective-C, PHP, Racket, Seed7, Swift).

C++

C++ programming languageC++98C with Classes
In C++ interfaces are known as abstract base classes and implemented using pure virtual functions.

Perl

Perl 5Perl programming languagePerl Script
The object-oriented features in Perl also support interfaces.