All interfaces are abstract in Java so in the context of a discussion in
a Java group I don't see the point.
We're discussing an abstract programming concept so by the term
"abstract interface" here I meant to refer to the theoretical concept
rather than the Java specific term. Although it turns out that Java's
interfaces map very nicely to abstract interfaces and vice versa.
I don't see it I'm afraid
Per my definition, it boils down to three things: abstraction,
polymorphism, and inheritance. Function pointers I hope we can both
agree satisfy polymorphism. Inheritance of implementation comes about by
having something like this:
int SuperStack_pop(Stack *s) {
int rv = Stack_pop(s);
/* do something else */
return rv;
}
Not as elegant as Java, but it works.
For the abstraction paradigm, note that it is possible to provide two
different implementations of stack methods that use the same interface.
You could use a sentinel stack, a circularly-linked list stack, or a
regular no-sentinel stack. You could get even more creative if you
abused the ability to type-pun in C and made the top node pointer do
something else. If it were a plain void *pImpl member (as is more common
in C OOP libraries) that the "class" could allocate at well, then
there's no limit to how many different implementations.
This doesn't alter the fact that my C code is not Object Oriented
I would say you're thinking about it in the wrong terms. Programming
paradigms are nothing more than philosophies to structure code, so you
could easily write declarative, imperative, functional, and
object-oriented code all in the same language, and even the same code.
This is why I dislike calling languages "functional", "object-oriented",
etc.: it obscures the fact that these terms have really fuzzy boundaries
when applied to real-world languages and that what you have at best is a
spectrum that really refers to how easy it is to do something.