Talk:Interface (computing): Difference between revisions

Content deleted Content added
neither "component" nor "specification"....
 
Dysprosia (talk | contribs)
repl
Line 1:
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?<br>[[User:Jorge Stolfi|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 <tt>int add(int, int);</tt>, <tt>int sub(int, int);</tt>, <tt>int some_weird_f(int);</tt>, 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. [[User:Dysprosia|Dysprosia]] 10:09, 28 Apr 2004 (UTC)