On Tue, 28 Apr 1998, Jack Scheible wrote:
> > The problem with type is that is used everywhere and for many things
> > (data type, record type, object type, sub-type, essential type,
> > etc), but it is quickly becoming the WRONG choice of word in the OOP
> > context. TYPE in F90 means record type (C's struc, Pascal's record,
> > etc), but in OOP classes are very much more than mere records.
>
> The ONLY difference between a struct and a class in C++ is that
> everything defaults to public in a struct and private in a class.
And who uses the struc in C++? It seems everybody uses class when really
programming C++ since it is better with its default to private.
C's struc is F90's TYPE, I only wanted to point out the analogy.
Why did B Stroustrup think it necessary to add a class if he could just
extend C's struc? He did the right thing, even if he didn't know all the
reasons. (But he shouldn't have extended struc since that opens up
all kinds of problems.)
Cheers,
WWS
-----------------------------------------------------------------------
| Werner W Schulz |
| Dept of Chemistry email: [log in to unmask] |
| University of Cambridge Phone: (+44) (0)1223 336 502 |
| Lensfield Road Secretary: 1223 336 338 |
| Cambridge CB2 1EW Fax: 1223 336 536 |
| United Kingdom WWW: |
-----------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|