xtofl
xtofl

Reputation: 41519

'class' relates to 'object' as 'interface' relates to ...?

In development conversations all too often we mix up 'class' and 'object'. But at least it's possible to differentiate between them.

It's much much worse when it comes to 'interface': I know a class can implement an interface, but e.g. COM it's possible to query an object's 'interface'.

Is there a better term to describe 'the part of that object that implements interface X'?

Upvotes: 3

Views: 59

Answers (1)

Charlie Martin
Charlie Martin

Reputation: 112386

"Contract". The interface tells you a contract on which the thing implementing the interface promises to deliver.

Look up "contract" sometime in a dictionary. It will tell you that a contract must be specific, with exact deliverables and consequences for failing.

Upvotes: 1

Related Questions