Skip to main content
Commonmark migration
Source Link

In some object-oriented programming languages, the keyword interface is used for declaring a type that defines how objects that implement (another keyword) it may accept messages (calls) from other objects. These types declared with the keyword interface end up being called interfaces themselves.

However, some objects do not implement an interface but also accept messages (again, calls) from other objects. This is defined simply by what the object makes publicly visible. This is also commonly called the object’s interface, even though there is no separately defined type for it.

Using the same term for two distinct but related concepts makes writing about them difficult. I have seen explicit interface used to mean the first kind. However, in C♯ this term has a different meaning than what I’m discussing here: there it means package disambiguation.

I need two different terms for these so that I can separately refer to these two distinct concepts in a way that always makes clear which of the two senses I mean, and I need this pair of terms to work for every object-oriented programming language that exists.

###A little background for clarity

A little background for clarity

When Java, and later C♯, decided to create a type that did not allow implementation code to exist in it but only defined a set of accessible methods (a protocol) they decided on interface as the keyword for this. This meant people would come to refer to these types as interfaces.

However, the word interface already had another meaning. It meant whatever was accessible by virtue of not being hidden by access modifiers like private. It still also means this, but when people use the word interface now, it has become hard to know which of the two senses they mean.

Other languages like C++ have no keyword for this and just call such creations header files. Thus a C++ programmer can freely talk about header files and interfaces with no ambiguity resulting.

In some object-oriented programming languages, the keyword interface is used for declaring a type that defines how objects that implement (another keyword) it may accept messages (calls) from other objects. These types declared with the keyword interface end up being called interfaces themselves.

However, some objects do not implement an interface but also accept messages (again, calls) from other objects. This is defined simply by what the object makes publicly visible. This is also commonly called the object’s interface, even though there is no separately defined type for it.

Using the same term for two distinct but related concepts makes writing about them difficult. I have seen explicit interface used to mean the first kind. However, in C♯ this term has a different meaning than what I’m discussing here: there it means package disambiguation.

I need two different terms for these so that I can separately refer to these two distinct concepts in a way that always makes clear which of the two senses I mean, and I need this pair of terms to work for every object-oriented programming language that exists.

###A little background for clarity

When Java, and later C♯, decided to create a type that did not allow implementation code to exist in it but only defined a set of accessible methods (a protocol) they decided on interface as the keyword for this. This meant people would come to refer to these types as interfaces.

However, the word interface already had another meaning. It meant whatever was accessible by virtue of not being hidden by access modifiers like private. It still also means this, but when people use the word interface now, it has become hard to know which of the two senses they mean.

Other languages like C++ have no keyword for this and just call such creations header files. Thus a C++ programmer can freely talk about header files and interfaces with no ambiguity resulting.

In some object-oriented programming languages, the keyword interface is used for declaring a type that defines how objects that implement (another keyword) it may accept messages (calls) from other objects. These types declared with the keyword interface end up being called interfaces themselves.

However, some objects do not implement an interface but also accept messages (again, calls) from other objects. This is defined simply by what the object makes publicly visible. This is also commonly called the object’s interface, even though there is no separately defined type for it.

Using the same term for two distinct but related concepts makes writing about them difficult. I have seen explicit interface used to mean the first kind. However, in C♯ this term has a different meaning than what I’m discussing here: there it means package disambiguation.

I need two different terms for these so that I can separately refer to these two distinct concepts in a way that always makes clear which of the two senses I mean, and I need this pair of terms to work for every object-oriented programming language that exists.

A little background for clarity

When Java, and later C♯, decided to create a type that did not allow implementation code to exist in it but only defined a set of accessible methods (a protocol) they decided on interface as the keyword for this. This meant people would come to refer to these types as interfaces.

However, the word interface already had another meaning. It meant whatever was accessible by virtue of not being hidden by access modifiers like private. It still also means this, but when people use the word interface now, it has become hard to know which of the two senses they mean.

Other languages like C++ have no keyword for this and just call such creations header files. Thus a C++ programmer can freely talk about header files and interfaces with no ambiguity resulting.

Mod Moved Comments To Chat
edited title
Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50

Need words to resolve the ambiguity of "interface" in OOP. It is both a keyword forcan mean either a type anddefined with the accessibility ofkeyword "interface" or an objectobject's accessibility

edited title
Source Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50

How can I distinguish Need words to resolve the general senseambiguity of “interface” from the specific sense"interface" in writing aboutOOP. It is both a keyword for a type and the accessibility of an object-oriented programming languages?

In some object-oriented programming languages, the keyword interface is used for declaring a type that defines how objects that implement (another keyword) it may accept messages (calls) from other objects. These types declared with the keyword interface end up being called interfaces themselves.

However, some objects do not implement an interface but also accept messages (again, calls) from other objects. This is defined simply by what the object makes publicly visible. This is also commonly called the object’s interface, even though there is no separately defined type for it.

Using the same term for two distinct but related concepts makes writing about them difficult. I have seen explicit interface used to mean the first kind. However, in C♯ this term has a different meaning than what I’m discussing here: there it means package disambiguation.

I need two different terms for these so that I can separately refer to these two distinct concepts in a way that always makes clear which of the two senses I mean, and I need this pair of terms to work for every object-oriented programming language that exists.

###A little background for clarity

When Java, and later C♯, decided to create a type that did not allow implementation code to exist in it but only defined a set of accessible methods (a protocol) they decided on interface as the keyword for this. This meant people would come to refer to these types as interfaces.

However, the word interface already had another meaning. It meant whatever was accessible by virtue of not being hidden by access modifiers like private. It still also means this, but when people use the word interface now, it has become hard to know which of the two senses they mean: the older, more general meaning or the newer, more specific one.

Other languages like C++ have no keyword for this and just call such creations header files. Thus a C++ programmer can freely talk about header files and interfaces with no ambiguity resulting.

How can I distinguish the general sense of “interface” from the specific sense in writing about object-oriented programming languages?

In some object-oriented programming languages, the keyword interface is used for declaring a type that defines how objects that implement (another keyword) it may accept messages (calls) from other objects. These types declared with the keyword interface end up being called interfaces themselves.

However, some objects do not implement an interface but also accept messages (again, calls) from other objects. This is defined simply by what the object makes publicly visible. This is also commonly called the object’s interface, even though there is no separately defined type for it.

Using the same term for two distinct but related concepts makes writing about them difficult. I have seen explicit interface used to mean the first kind. However, in C♯ this term has a different meaning than what I’m discussing here: there it means package disambiguation.

I need two different terms for these so that I can separately refer to these two distinct concepts in a way that always makes clear which of the two senses I mean, and I need this pair of terms to work for every object-oriented programming language that exists.

###A little background for clarity

When Java, and later C♯, decided to create a type that did not allow implementation code to exist in it but only defined a set of accessible methods (a protocol) they decided on interface as the keyword for this. This meant people would come refer to these as interfaces.

However, the word interface already had another meaning. It meant whatever was accessible by virtue of not being hidden by access modifiers like private. It still also means this, but when people use the word interface now, it has become hard to know which of the two senses they mean: the older, more general meaning or the newer, more specific one.

Other languages like C++ have no keyword for this and just call such creations header files. Thus a C++ programmer can freely talk about header files and interfaces with no ambiguity resulting.

Need words to resolve the ambiguity of "interface" in OOP. It is both a keyword for a type and the accessibility of an object

In some object-oriented programming languages, the keyword interface is used for declaring a type that defines how objects that implement (another keyword) it may accept messages (calls) from other objects. These types declared with the keyword interface end up being called interfaces themselves.

However, some objects do not implement an interface but also accept messages (again, calls) from other objects. This is defined simply by what the object makes publicly visible. This is also commonly called the object’s interface, even though there is no separately defined type for it.

Using the same term for two distinct but related concepts makes writing about them difficult. I have seen explicit interface used to mean the first kind. However, in C♯ this term has a different meaning than what I’m discussing here: there it means package disambiguation.

I need two different terms for these so that I can separately refer to these two distinct concepts in a way that always makes clear which of the two senses I mean, and I need this pair of terms to work for every object-oriented programming language that exists.

###A little background for clarity

When Java, and later C♯, decided to create a type that did not allow implementation code to exist in it but only defined a set of accessible methods (a protocol) they decided on interface as the keyword for this. This meant people would come to refer to these types as interfaces.

However, the word interface already had another meaning. It meant whatever was accessible by virtue of not being hidden by access modifiers like private. It still also means this, but when people use the word interface now, it has become hard to know which of the two senses they mean.

Other languages like C++ have no keyword for this and just call such creations header files. Thus a C++ programmer can freely talk about header files and interfaces with no ambiguity resulting.

copyedit
Source Link
tchrist
  • 137.3k
  • 49
  • 376
  • 609
Loading
deleted 1 character in body
Source Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50
Loading
added 524 characters in body
Source Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50
Loading
added 2 characters in body
Source Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50
Loading
deleted 1 character in body
Source Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50
Loading
Source Link
candied_orange
  • 10.1k
  • 1
  • 28
  • 50
Loading