Re: Abstraction encapsulation & interfaces

From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 10/15/04


Date: Fri, 15 Oct 2004 11:50:18 +0100

In article <2t9nl1F1sh7jkU1@uni-berlin.de>, Val \
<chrisval@bigpond.com.au> wrote:
>
> | How exactly does that differ from what I said?
>
> Well, you asked this question:
> "| Doesn't abstracting an implementation mean the same as
> | providing an interface for it?"
>
> AFAIUI, you only have an interface, if you have encapsulation,
> and you only have encapsulation, if you have private or possibly
> protected data

I think we are splitting hairs now.

> - Otherwise you just have an public 'C' structure
> that offers nothing of real value.

You can implement abstract data types in C too, arguably just as well
as in C++. Opaque types are also possible, where the implementation
data are completely hidden; you might even find the following page
interesting:
<http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFDe
signConcepts/Concepts/OpaqueTypes.html>

Alwyn



Relevant Pages

  • Re: Abstraction encapsulation & interfaces
    ... |> | How exactly does that differ from what I said? ... |> AFAIUI, you only have an interface, if you have encapsulation, ... |> and you only have encapsulation, if you have private or possibly ... | You can implement abstract data types in C too, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Tuning ADSL lines on Ciscos roputer - LONG -
    ... > Encapsulation ARPA, loopback not set ... > Last clearing of "show interface" counters never ... > 0 output buffer failures, ... > Hardware is PQUICC Ethernet, ...
    (comp.dcom.sys.cisco)
  • Re: Has lack of testing of object change affected reliabliity?Re: OO COBOL - What if ???
    ... Encapsulation is a concept ... systems do NOT need maintenance in the same way that procedural COBOL ... What of components written in procedural COBOL? ... can only be used through its interface. ...
    (comp.lang.cobol)
  • Re: php 5 classes: public, protected and private
    ... Private members can be accessed by members of the class only. ... Intefaces are not necessary in PHP. ... the interface is the way to interact with the ... Two of the concepts in OO are 'encapsulation' and 'methods'. ...
    (comp.lang.php)
  • Re: php 5 classes: public, protected and private
    ... Private members can be accessed by members of the class only. ... Intefaces are not necessary in PHP. ... the interface is the way to interact with the ... Two of the concepts in OO are 'encapsulation' and 'methods'. ...
    (comp.lang.php)