Ian Collins wrote:
> What's your point? The fact that struct is close to a synonym for class
> is irrelevant. Your example struct is equally valid in both languages,
> C++ treats it exactly the same as C. Saying you can't write anything
> useful in C++ without classes is like saying you can't write anything
> useful in C without using structs.
I have never written anything serious in C without using data types and
structures. Even a "hello world" program needs stdio.h that has (at
least) the definition of FILE.
Structures are central to C, as classes are to C++.
> In both languages we represent
> collections of data in structures.
C++ uses inheritance. Didn't know that you can inherit from a C
structure.
>>>> Maybe, who knows what buzzword will be invented in the future, but
>>>> the fact is that without classes you just can't do anything at all in
>>>> C++.
>>>>
>>> If everything C does plus quite a bit more (like your beloved operator
>>> overloading) amounts to nothing.....
>>>
>> You are just playing word games, a favorite sport in this group.
>> Of course you can write programs in C and compile them with C++,
>> modulo some differences it is possible.
>
> That's not what I said. Are function templates OO? Is function
> overloading OO? Are exceptions OO?
>
Exceptions are objects in C++. The exceptions I am proposing for C
aren't objects but just integer error codes, what is quite different.
>
> All of the extensions to C you keep pushing are available in standard
> C++, today.
>
Yes, and so what?
Why wouldn't those extensions be acceptable then?
Why must C be frozen for the benefit of C++?
This attitude:
"The better C is C++, improving C has no sense" has destroyed any
development of the language and left us with bugs that are fixed
forever in some distant past.
It is time to stop this situation.
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32