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; Do you agree with the author? Yes, since it is clear that procedural programming is introduced as the first programming ...

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,780
    Do you agree with the author?
    Yes, since it is clear that procedural programming is introduced as the first programming paradigm in pretty much any introductory text, whether it uses C, C++, Java, Scheme, etc. I disagree with the conclusion that languages that support other programming paradigms directly should be ruled out as a first programming language, since the author has not established that it is more difficult to teach procedural programming with such languages.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #17
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    I think for intro to computers, variety is more important than specializing on a particular programming language, or even programming at all. But for intro to programming or programming 101, sure, I think C is fine.

  3. #18
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,475
    I clearly misinterpreted the initial post. I assumed university level students. In my time there where no programming classes until university and only those who had any prior ad hoc knowledge of programming languages would seek out these courses.

    So, I ask exactly where is the problem? Because many programmers today were shaped out of any kind of tutorship and method. Some started out in BASIC (a good part at least those from my generation), but today there's 15 year old kids doing C or C++ that can run circles around my code and yet never touched one line of BASIC. Clearly, there's no issue with pointers in C that stopped these children from teaching themselves.

    Pointers in C are no harder than trigonometry in math. And they never force the student to concentrate in tasks non related to programming. On the contrary, they have the real potential of making it very clear to the student the hurdles of the programming task, like achieving code correctness and getting to understand the pitfalls of the programming language as a tool.

    What is this we want exactly? A programming pop culture? Everything made easy and prep-packed in a nice and cute manner, and with it breed a generation of incompetent programmers that were never really given a chance to understand what it means to be a programmer? Because after they happily and blissful sign in for a 5 year course at their universities, they will realize they had been lied to.

    EDIT: It occurred to me... I'm not defending C or C++ over any other language for the purposes of teaching, or anything like that. For all that matter I would be equally glad they were taught BASIC. I'm solely arguing against this notion that just because a language introduces some form of attrition, it suddenly doesn't make a good tool for learning process. And I'm arguing this ridiculous idea that school should be made easy and fun.
    Last edited by Mario F.; 10-04-2008 at 02:23 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.

  4. #19
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Posts
    1,853
    Well, generally there are a lot of opinions about the matter. For me in the end every language based on C is like C with additional features.
    A more appropriate question is to say if they should start with C or Haskell (or ML). Or maybe Prolog, since all of the above really use different logic.

  5. #20
    Registered User
    Join Date
    Jun 2008
    Posts
    266
    >>Besides, it is my individual crusade to rid the world of C

    I knew you had something more than just a grudge against C. Almost any chance you get you mention some problem of C, or how much better C++ in in a particular aspect.

  6. #21
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by lruc View Post
    >>Besides, it is my individual crusade to rid the world of C

    I knew you had something more than just a grudge against C. Almost any chance you get you mention some problem of C, or how much better C++ in in a particular aspect.
    That's my crusade too.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  7. #22
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,633
    Quote Originally Posted by lruc View Post
    >>Besides, it is my individual crusade to rid the world of C

    I knew you had something more than just a grudge against C. Almost any chance you get you mention some problem of C, or how much better C++ in in a particular aspect.
    When I get a chance, I do. Otherwise it wouldn't be much of a crusade, would it?
    Of course I also disagree that you should learn C before delving into C++ (if you want to learn C++ as a ground).
    Since C++ is an extension of C, usually you would learn everything about pointers, memory management and all that while learning C++, making C obsolete. It also avoids the pitfalls in C that should never have existed (implicit function calls being one of the most severe).
    Of course, that can be argued, but it's my humble opinion.
    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.

  8. #23
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,709
    >> It also avoids the pitfalls in C that should never have existed (implicit function calls being one
    >> of the most severe).

    Um, it may be your opinion, but non-main functions are explicitly called. I do believe you are making up problems now. The issue I think you mean is prototypes being implicitly being included, such as for printf, or C assuming functions return int when they're not declared. The first part is caused by the C run-time, which does depend on certain libraries. The second is well reported by the compiler but it's not a bad thing to expect more I suppose. Don't start making up a problem, though.

  9. #24
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070
    Quote Originally Posted by nonoob
    I think those fundamentals may not be taught today.
    I just started an Introduction to Object-Oriented Programming at uni (prerequisite for other comp. sci. courses), and we were taught some fundamentals (base-2, dec to bin conversion, von Neumann arch, etc), but not quite as much as what you listed. I would imagine it varies from school to school.

    Quote Originally Posted by citizen
    And likewise, I really don't think schools are teaching C first to CS students, but who knows about other disciplines?
    In the course I mentioned above, we're using Java which probably isn't a bad choice, since most in the class are having a relatively tough time as is, without having to do their own memory management or understand anything above the most basic understanding of what OO is.

    A friend of mine on the other hand is doing Engineering, and I believe they're required to do an introductory programming course that starts them off in C or C++ (I don't recall which - probably C compiled as C++).
    Last edited by psychopath; 10-05-2008 at 08:52 PM. Reason: typo
    Memorial University of Newfoundland
    Computer Science

    Mac and OpenGL evangelist.

  10. #25
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,633
    Quote Originally Posted by citizen View Post
    >> It also avoids the pitfalls in C that should never have existed (implicit function calls being one
    >> of the most severe).

    Um, it may be your opinion, but non-main functions are explicitly called. I do believe you are making up problems now. The issue I think you mean is prototypes being implicitly being included, such as for printf, or C assuming functions return int when they're not declared. The first part is caused by the C run-time, which does depend on certain libraries. The second is well reported by the compiler but it's not a bad thing to expect more I suppose. Don't start making up a problem, though.
    Not making things up. The problem I'm referring to is the ability to call functions with a prototype, in which case C will assume that the prototype is int function(...), which is NOT a good thing!

    Btw, I see you've seen an anime I know of! Zero no Tsukaima or Zero's familiar. Hehe.
    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.

  11. #26
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by Elysia View Post
    Not making things up. The problem I'm referring to is the ability to call functions with a prototype, in which case C will assume that the prototype is int function(...), which is NOT a good thing!
    Right. So that's not an implicit function call, that's an assumption being made about an explicit function call. An implicit function call would look like this (C++ example):
    Code:
    a = b + c; //implicit function call operator+(), and operator=()

  12. #27
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,633
    So what do you want to call it?
    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.

  13. #28
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by Elysia View Post
    So what do you want to call it?
    I would call it "making assumptions about missing prototypes".

  14. #29
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,633
    Alright, so until some better name or official term shows up, I'll just say that C has the ability to make assumptions about missing prototypes which is a very bad thing.
    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. #30
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,475
    Why? Doesn't this simply mean that it is poor form to not declare your functions?

    If the behavior is unspecified (and you have a lot of that on C++ too) the general rule of thumb is... don't do it.
    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.

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