Re: As a programmer of both languages...
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Wed, 12 Dec 2007 23:14:34 +1300
jacob navia wrote:
Ian Collins wrote:What's your point? The fact that struct is close to a synonym for class
jacob navia wrote:
Ian Collins wrote:Your ignorance continues to astound. Maybe you should take some time
jacob navia wrote:You can't program in C++ without using classes. Even if you define
The difference between C and C++ is the object orientation of C++.Are you really dense, or just being obtuse? As you have been told many
C is
not object oriented.
times before, C++ is a multi paradigm language. You can *choose* to
write OO or procedural code in C++.
a simple structure it is actually a class.
out and learn C++ before slagging it off.
Yes Sir!
struct A {
int age;
char *Name;
};
int main(void)
{
A jacob;
}
This is valid C++ but invalid C. In C++ each "structure" definition
is just a CLASS where all members are PUBLIC by default. I see this
explanation in all C++ books I read but in my ignorance I believe
them. Stupid isn't it?
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. In both languages we represent
collections of data in structures.
Maybe, who knows what buzzword will be invented in the future, butIf everything C does plus quite a bit more (like your beloved operator
the fact is that without classes you just can't do anything at all in
C++.
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?
Does your beloved operator overloading make sense without structs?
I would be surprised that youMany of the C++ standard library algorithms work equally well with
can use the STL without using implicitly a class!!!
pointers. Very little of the STL is OO, which ironically is a common
criticism of it from OO purists.
All of the extensions to C you keep pushing are available in standard
C++, today.
--
Ian Collins.
.
- Follow-Ups:
- Re: As a programmer of both languages...
- From: jacob navia
- Re: As a programmer of both languages...
- References:
- As a programmer of both languages...
- From: Tomás Ó hÉilidhe
- Re: As a programmer of both languages...
- From: jacob navia
- Re: As a programmer of both languages...
- From: Ian Collins
- Re: As a programmer of both languages...
- From: jacob navia
- Re: As a programmer of both languages...
- From: Ian Collins
- Re: As a programmer of both languages...
- From: jacob navia
- As a programmer of both languages...
- Prev by Date: Re: Problem with eclipse and a simple c program
- Next by Date: Re: Exceptions in C/C++
- Previous by thread: Re: As a programmer of both languages...
- Next by thread: Re: As a programmer of both languages...
- Index(es):
Relevant Pages
|