is C appropriate for intro to computers?

This is a discussion on is C appropriate for intro to computers? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; C++ in a way offers everything that C offers plus some new stuff. Like classes, exception handling. It makes the ...

  1. #166
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    C++ in a way offers everything that C offers plus some new stuff. Like classes, exception handling. It makes the "game" more fun. Java and C# are really OOP. No fun. Because the fun is creating algorithms, not managing code.
    I dont get your point. The main reason I like HLLs is because I dont have to spend most of my time managing my code.
    On the other hand, C++ is somehow incomplete. If you want OOP features you are really better with C#.
    Again I dont get it. What OOP features does C++ lack?

  2. #167
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Built-in garbage collection... Unless you are using C++ .NET extentions.. Which I find rediculous to even fathom using except for certain tasks where C# just can't make the grade.

    I am glad to see the only element of agreement with Elysia happened to be "Writing algorithms is more fun than just writing a funcitonal program." My heart grew three sizes too large after reading that.

    Good call, Thantos.

  3. #168
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Quote Originally Posted by mike_g View Post
    I dont get your point. The main reason I like HLLs is because I dont have to spend most of my time managing my code.

    Again I dont get it. What OOP features does C++ lack?
    Like everything derives from Object. Autoboxing. No forward declaration. Properties. Arrays are objects. A lot of keywords for classes. Interfaces. Foreach. Delegates. References (as not value type).
    Eh, OK, no HUGE differences. But you get the idea...

  4. #169
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    foreach does exist in <algorithms>....

  5. #170
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,706
    Quote Originally Posted by C_ntua View Post
    I have to say that I actually see Elysia's point. I will more describe be as the "fun of programming". C++ in a way offers everything that C offers plus some new stuff. Like classes, exception handling. It makes the "game" more fun. Java and C# are really OOP. No fun. Because the fun is creating algorithms, not managing code.
    Quote Originally Posted by C_ntua View Post
    Like everything derives from Object. Autoboxing. No forward declaration. Properties. Arrays are objects. A lot of keywords for classes. Interfaces. Foreach. Delegates. References (as not value type).
    Eh, OK, no HUGE differences. But you get the idea...
    If Java is no fun because it has these features then I suppose it's a good thing C++ did not include them. I really don't get your point either, I'm afraid.

    If the argument was about "the fun of programming" the thread would have ended ten pages ago, too. About the only way Elysia's statements relate to yours is the fact that she thinks C++ is better than C because C++ is more "fun" to write. Now sprinkle in some fundamentalism and a desire to burn C textbooks because C's not "fun". Stir ingredients into a large bowl. Bake for 45 minutes at 400F on a nonstick pan, and you've got you're very own Elysia. Serves 12.

  6. #171
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    >> If Java is no fun because it has these features then I suppose it's a good thing C++ did not include them.

    Methinks, C_ntua was saying Java is fun because of those. But I dunno. Don't make Elysia mad... she will nit-pick your every missed colon, incorrect grammar, misspelling, typeo, and misunderstanding of any question until you are forced into oblivion!

  7. #172
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    Quote Originally Posted by C_ntua
    Because the fun is creating algorithms, not managing code.
    If the fun is in creating algorithms (I'm not going to argue your tastes naturally) then I suggest perhaps a good notebook, a pencil and an eraser. Programming languages are terrible tools for that.

    Meanwhile "managed code" doesn't mean you yourself is going to manage your code (whatever that may be). The term is used to describe programing languages that have their code executed through a virtual machine and has no relation to the code maintainability qualities. Just thought I'd let you know.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #173
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,706
    Don't make Elysia mad... she will nit-pick your every missed colon, incorrect grammar, misspelling, typeo, and misunderstanding of any question until you are forced into oblivion!
    Maybe I can get out of it if I let her turn me into a recipe too.

  9. #174
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    If you do can I keep the weber?

    edit: hmm... bad joke. I just mean since you are giving your life away to a code vegan I might as well keep your stuff
    Last edited by Mario F.; 10-13-2008 at 07:42 PM.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #175
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Haha. Well as long as there is a silver lining to this cloud, I say let Mario keep the stuff. I will take a vow of protecting your source materials from being stolen by Microsoft.

  11. #176
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,706
    Just distribute my ashes in accordance with your understanding of my geographical preferences. My ashes are not to be kept by any individual for a period exceeding one month.

    The remainder of my possessions are to be divided into equal shares.

  12. #177
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,467
    >> Just distribute my ashes in accordance with your understanding of my geographical preferences.

    I'm going with countries started with C. http://en.wikipedia.org/wiki/List_of_countries#C
    Christmas, Cocos and Cook Islands.

    (I also appreciate the irony of the # on the url, but can't think of anything to say... bah!)
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  13. #178
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Quote Originally Posted by Mario F. View Post
    If the fun is in creating algorithms (I'm not going to argue your tastes naturally) then I suggest perhaps a good notebook, a pencil and an eraser. Programming languages are terrible tools for that.

    Meanwhile "managed code" doesn't mean you yourself is going to manage your code (whatever that may be). The term is used to describe programing languages that have their code executed through a virtual machine and has no relation to the code maintainability qualities. Just thought I'd let you know.
    I am just pointing out that when you have better control over what you do it is more "fun" in some things. So, C++ is like C with extra features. That is how you would see it. Java/C# are more OOP. Don't argue that you can do everything also with C++. It is just their style.
    So, my guess is that if C++ didn't exist Elysia would like C over Java/C#, just as a preference. Since it exists she/he finds C useless and whats to get rid of it.
    The bottom line is that Java/C# are really similar and their ideas are based on C++. And all are 80&#37; like C. So you cannot actually really disagree in the first place.

    The real question I believe professors face is this: "I will teach the basic stuff of C that are common in all these languages. Why switch to something else if I don't use it's features?".
    My answer would be (as said like 10 pages before) to teach something more advanced to introduce the tool. Like giving a shotgun to somebody and teach him only to use it as a club. Even though he won't know how to shoot maybe he will learn by himself. In any case you familiarize him with the tool. That's all. A small difference in the end. If the wanted to teach OOP features the couldn't use C in the first place.
    As a final note, C++ really seems the worst choice. It is the most complicated of all.

  14. #179
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,614
    Quote Originally Posted by C_ntua View Post
    As a final note, C++ really seems the worst choice. It is the most complicated of all.
    How do you figure?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #180
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Quote Originally Posted by Elysia View Post
    How do you figure?
    Java
    Code:
    int cost(Oranges o, Apples a) {
        if (o.paid == true || a.paid == true)
            return;
        else
            o.paid = true; a.paid = true;
        return o.cost() + a.cost();
    }
    C++
    Code:
    int cost(Oranges& o, Apples& a) {
        if (o.paid == true || a.paid == true) {
            return 0;
        } else {
            o.paid = true; 
            a.paid = true;
        }
        return o.cost() + a.cost();
    }
    An example how to use objects inside a function. You tell the newbie that, in C#, you just pass the objects, not needing to explain the difference of by value and by reference.
    Now, the same example can be used to teach a higher-level newbie about the difference between passing an object by reference or by value.
    You get my point. C++ illustrates better some things, C# some other.
    Last edited by C_ntua; 10-14-2008 at 01:45 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Numeric addresses for computers
    By great in forum C Programming
    Replies: 4
    Last Post: 08-23-2010, 11:53 AM
  2. Computers as authors
    By hk_mp5kpdw in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-22-2004, 07:55 PM
  3. Industrial vs home computers
    By nbo10 in forum Tech Board
    Replies: 10
    Last Post: 09-01-2004, 02:04 AM
  4. Matrix and vector operations on computers
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 05-11-2004, 06:36 AM
  5. Love programming, hate computers
    By PJYelton in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 12-14-2002, 12:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21