Find the answer to your Linux question:
Page 3 of 3 FirstFirst 1 2 3
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.
  1. #21
    Just Joined!
    Join Date
    Jun 2005
    Location
    Canada, Halifax
    Posts
    86

    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 many years.
    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.

  2. #22
    Just 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.

  3. #23
    Linux Newbie GNOME_n00b's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    142
    I don't understand why C is not a subset of C++. It most definitely is.
    actually, a more accurate description would be to call C++ a superset of C.

    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:
    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.
    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.

  4. #24
    Just 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.

  5. #25
    Linux Newbie GNOME_n00b's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    142
    davebardsley
    in that case, i wish george harrison the very best of luck if he really wants to continue to persue C.

Page 3 of 3 FirstFirst 1 2 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •