On Java's Interface (the meaning of interface in computer programing)

Lew lew at nospam.lewscanon.com
Wed Mar 21 13:53:05 CET 2007


Xah Lee wrote:
> In a functional language, a function can be specified by its name and

Are you sure you know what a "functional language" is?

> parameter specs. For example:
> f(3)
> f(3, [9,2])
> f("some string")

This is not really "typical" syntax for a functional language. LISP, for 
example, has the "function name" as an element of a list. (Some might argue 
that LISP isn't exactly a functional language.)

Also, since you are commenting on Java, you should use "Java-like" syntax 
rather than "[9,2]". What is "[9,2]" intended to represent? The range of 
integers decreasing from 9 to 2, inclusive?

> For another example, usually a program needs to talk to another
> software such as a database software. 

Interesting use of the word "software".

> In essence, making the database useful to other software.

This is not a sentence.

> Such a list of function spec is often called API, which stands for Application
> Programing Interface.

"an API"

> The API terminology is abused by the marketing-loving Sun Microsystems
> by calling the Java language's documentation as “The Java API”, even
> though Java the language and its paraphernalia of libraries and
> hardware-emulation system (all together jargonized as “the Java
> Platform”) isn't a Application nor Interface. (a [sic] API implies that
> there are two disparate entities involved, which are allowed to
> communicate thru [sic] it. In the case of “The Java API”, it's one entity
> talking to itself.).

This is incorrect in every factual detail. And what's with the editorial 
comment in the middle of the exposition ("marketing-loving", "jargonized")? 
How does that help explain the concepts, even if it were supportable by the 
evidence?

Sun calls the API documentation "the Java API documentation", not "the Java 
API", and not the language documentation, and the API is indeed an interface. 
An API need not be, and quite often is not, an application - being an 
application is in no wise part of being an API. And why in the world did you 
capitalize "Application" and "Interface"?

It's "an API", not "a API". It's "through", not "thru".

The statement about an "API" having to do with "two disparate entities" makes 
no sense. There is certainly nothing in the API that one can characterize as 
"one entity talking to itself". What "entities" do you imagine are involved?

> In general, the interface concept in programing is a sort of
> specification that allows different entities to call and make use of
> the other [sic], with the implication that the caller need not know what's
> behind the facade.

There is no antecedent for "the other", and you haven't defined "entities", 
and the word "interface" has a number of meanings "in general ... in 
programming". You should focus on the Java meaning (and your grammar).

> In the Object Oriented Programing Paradigm [sic], a new concept arose, that
> is the “interface” aspect of a class.

Historical citation needed. And an interface is not an "aspect of a class".

> As we've seen, a function has parameter spec [sic] that is all there it [sic] is a
> user needs to know for using it. In Java, this is the method's
> “signature”. Now, as the methodology of the OOP experience multiplies,
> it became apparent that the interface concept can be applied to
> Classes as well. Specifically: the interface of a class is the class's
> methods.

OK, I've had enough. I'd say you need a good editor to clean up the grammar, 
but then all you'd have is a better-written incorrect explanation.

-- Lew



More information about the Python-list mailing list