Talk:Interface (computing)

This is an old revision of this page, as edited by 200.40.165.130 (talk) at 15:07, 8 September 2006 (Merger). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Previous text said "interface is a software component", new one says "interface is a specification". The former may be awkward, but the latter is not good either. Specification is too vague, could be a paper document or a description in some logic language that is not understood by the compiler. Whereas an interface (in this sense) is specifically a file that is parsed by the compiler when compiling any client module, and is part of the software's source. So, is there a better term?
Jorge Stolfi 06:22, 28 Apr 2004 (UTC)

That's the point: an interface need not be defined in the source code. An interface is not always a file that is parsed by the compiler.
For example - this is rather simplistic - but say if you write a C program to work with integers and you write int add(int, int);, int sub(int, int);, int some_weird_f(int);, and I wish to use your program, we can work out an interface between your code and mine: that I'm only to use add and sub, but not some_weird_f. If I do use some_weird_f that's a violation of the interface. This "informal" interface still behaves exactly as an interface does/should. Dysprosia 10:09, 28 Apr 2004 (UTC)

Is an interface the same as an object type? Does anyone have explanaion or pointers to explanaion? -- Taku 14:54, Sep 19, 2004 (UTC)


The List

A list of programming languages in which the keyword "interface" has *some* meaning is kind of absurd. Wouter Lievens 13:22, 13 Apr 2005 (UTC)

Not at all, if you understand what's going on here. See the above talk. There is a distinction between interfaces and interface compliance being treated as part of the language (eg Objective-C "@interface"), and "informal" interfaces such as in C which are not really recognized by the compiler or is a first-class part of the language. Dysprosia 13:53, 13 Apr 2005 (UTC)

Merger

Shouldn't this be merger into Interface (object-oriented programming)?