Results 21 to 25 of 25
lakerdonald :
Calling C a subset of C++ is very misleading. While C++ may have more features than C, always keep in mind the fact that C predates C++ by ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-21-2005 #21Just Joined!
- Join Date
- Jun 2005
- Location
- Canada, Halifax
- Posts
- 86
lakerdonald:
Agreed; it is not fair (nor entirely correct) to call C++ a superset of C (or the converse). For the purposes of explaining the practical relationship between them the categorization is apt if not historically incorrect.Calling C a subset of C++ is very misleading. While C++ may have more features than C, always keep in mind the fact that C predates C++ by many years.
- 11-22-2005 #22Just Joined!
- Join Date
- Jul 2004
- Posts
- 94
I don't understand why C is not a subset of C++. It most definitely is.
Just to qualify the last sentence: C is a subset of C++, a proper subset, ONLY when we are considering the set of keywords in each language. C is NOT a subset when it comes to functionality. Indeed, in terms of performance and functionality, C is a subset to no other language (while it may be said that several others are a subset of it).
George Harrison, don't get carried away by all this talk about object-oriented programming. As I mentioned earlier, object-oriented programming is also possible in C. You just have to know how to encapsulate your data.
But the other crucial point is that object orientation is NOT always necessary, or even desirable. Try writing a device driver, or a file system, or many other low-level programmes of the kind in object-oriented fashion.
There is talk of GUI development, and the use of Python for RAD. In my opinion, C with GTK+, especially if you have Glade, is just as good for RAD. (Note: I am NOT trying to knock Python. I LOVE the language. But you should be aware that C can alsobe used for rapid development.)
Ultimately, you have to know, at least vaguely, what you want to do with the programming knowledge. If you want to be a real hardcore guy and programme filesystems and device drivers, you have very little choice other than C (C++). If you want to work a lot on web programming, PHP, Python or Perl would be the better choices. If you want to work on artficial intellenge, Lisp or Scheme are quite necessary.
I still believe that C is a great general-purpose language. It's small size makes it easy to learn, and its power makes possible a lot of things.
- 11-22-2005 #23actually, a more accurate description would be to call C++ a superset of C.I don't understand why C is not a subset of C++. It most definitely is.
besides, after george harrison said this in his forst few posts, i really don't think its the best idea for him to concentrate on C:
if he limits himself to C, he limits himself to procedural based programming. in other words, he limits himself to C. knowing at least 1 OO languages will allow him to easily transfer his knowledge to other languages if he decides to learn others. almost all languages these days are object oriented and so that is the only way forward.C is fun and all but I want something heavily based on object orientation and such and I think C++ would just suit me a bit more. Afterwards I might go back into C and possibly Java or something later.
- 11-22-2005 #24Just Joined!
- Join Date
- Jun 2005
- Location
- Canada, Halifax
- Posts
- 86
GNOME_n00b, George Harrison may simply be getting swept up in object oriented hype, when in fact it may not be necessary for his objectives. Even were that not the case I stand by my assertion that it is more logical to learn C first and then increment knowledge to object oriented programming. As Reisswolf has pointed out object oriented programming is available with C; don't let yourself be fooled by the lack of the class type. Knowledge gained through learning C will pay dividends when learning another language such as C++.
As a slight digression Eric S. Raymond's book "The Art of Unix Programming" http://www.faqs.org/docs/artu/ is a good read. From a certain point of view, taking a dogmatic stand on object oriented programming can be viewed as a metaphor for "policy" http://www.faqs.org/docs/artu/ch01s06.html#id2877777.
- 11-22-2005 #25
davebardsley
in that case, i wish george harrison the very best of luck if he really wants to continue to persue C.


Reply With Quote
