Discussions related to Visual Prolog
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

implement supports interface

Unread post by Peter Muraya »

Hi,
It is clear to me that an interface SUPPORTS another interface and that an implement INHERITS from a class. I note that in Visual Prolog it is valid for an implement to SUPPORT some interface, but I'm not quite clear when this would be useful. Can you show me a problem that is neatly solved by this Visual Prolog construct?
Mutall Data Management Technical Support
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

You will support an interface in the implementation if you privately need to be such an object, but don't want/need to expose it publicly.

The Support pattern shows such an example: the target supports the targetSite in the implementation. The targetSite is used to provide functionality from the target to the targetSupport. But this is not important for the external appearance of the target, and therefore the support is kept private in the implementation.
Regards Thomas Linder Puls
PDC
Post Reply