Talk:Interface pattern

There is a CS interface page.. http://en.wikipedia.org/wiki/Interface_(computer_science) --John van v 04:43, 22 August 2005 (UTC)

This page was not well written and has therefore been redirected to the Interface page until a new page can be created. Some of the elements that made this a poorly written page were as follows:

The previous introductory sentence contradicts the title and is at best controversial: "In computer science, the interface pattern isn't a specific pattern amongst design patterns."

By definition, a pattern is something that occurs continually and a design pattern is an abstract prescription of how to address a problem that occurs continually. While many books on design pattern don't specifically call out the conceptual notion of an interface, the concept of one entity defining the contract for a body of concerns is a pattern that occurs over and over.

The second statement is also arguably incorrect: "It's a general method for structuring programs so that they're simpler to understand."

The primary goal of an interface is not to make something easier to understand. This is essentially the intent behind the Facade Pattern, but the intent of using an interface is to separate the public contract for a body of behavior from its actual implementation such that the implementation may vary. The vast majority of interfaces expose the exact same public properties and methods that their concrete implementing types do.

The following statement not only conveys a highly subjective idea, but is additionally a poorly constructed sentence.

"In opposite to Java, where interfaces are common, this pattern is not very often used in C++."

Apart from the grammatical structure of the sentence, the conclusion that interfaces are not used often in C++ is a subjective observation, and one which presumes a definition of "interface" that I do not believe to be correct. Consider this statement from the Interface page ( http://en.wikipedia.org/wiki/Interface_%28computer_science%29 ):

"The concept of interface is the cornerstone of modular programming, a forerunner and a standard ingredient of object-oriented   programming."

Obviously, both of these statements can't be correct unless we conclude that C++ isn't an object-oriented language. —Preceding unsigned comment added by Derekgreer (talk • contribs) 20:19, 30 December 2007 (UTC)