home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / msdos / programm / 3013 < prev    next >
Encoding:
Internet Message Format  |  1992-12-25  |  3.4 KB

  1. Xref: sparky alt.msdos.programmer:3013 comp.os.msdos.programmer:11618 comp.sys.ibm.pc.programmer:678 comp.lang.c++:18416 comp.lang.c:18890
  2. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  3. Path: sparky!uunet!grebyn!daily!malak
  4. From: malak@grebyn.com (Michael Malak)
  5. Subject: Re: Newbie Wants Advice on C-Programming
  6. Message-ID: <1992Dec25.073517.16089@grebyn.com>
  7. Organization: Grebyn Timesharing
  8. References: <1992Dec24.154204.25248@blkbox> <1992Dec24.230420.4243@sequent.com> <1992Dec25.050515.20871@ncsu.edu>
  9. Date: Fri, 25 Dec 1992 07:35:17 GMT
  10. Lines: 66
  11.  
  12. In article <1992Dec25.050515.20871@ncsu.edu> bank@lea.csc.ncsu.edu (Belgarath the Sorcerer) writes:
  13. >    I'd like to follow-up on some subsequent Posts on this thread.
  14. >
  15. >2) The "Learn C or C++?" question can ONLY be answered by first
  16. >    asking "OOP or traditional?" If you are and/or want to stay
  17. >
  18. >    a traditional, top-down programmer, go with C. If you want
  19. >    to get into OOP, go with C++.
  20.  
  21. Asking "OOP or traditional" is like asking "Open end wrench or socket
  22. set".  You use each tool where appropriate, and as I said in my previous
  23. post, you need years of traditional C experience before you can realize
  24. where C++'s OOP can benefit you without miring you too much in
  25. inefficency.  If you read anyone's report of practical experience with
  26. C++, they tell you the hard thing to learn is where _not_ to use OOP.
  27.  
  28. >
  29. >3) If you are going to go into OOP, DO NOT start off with
  30. >    stuff like Pascal, as one person has suggested. OOP is a
  31. >    completely different mindset than the traditional forms used
  32. >    by Pascal and C. The best language for learning OOP is,
  33. >    of course, Smalltalk. I wouldn't want to DEVELOP anything
  34. >    in Smalltalk, but if I were to start learning OOP, I think
  35. >    that would be the best language to learn the concepts in.
  36.  
  37. The goal is to develop, not to use the wrench.
  38.  
  39. >
  40. >4) Even if you're not going into OOP, do NOT take up Pascal as
  41. >    a road to C. Pascal is a language that assumes you know
  42. >    very little and places lots of restrictions and
  43. >    inhibitions on you. If you already are a traditional-style
  44. >    programmer, you don't need the knowledge Pascal will
  45. >    teach you (modularization, declaration, etc). Go on into
  46. >    C and avoid having to unlearn all the limits Pascal will
  47. >    place on you.
  48.  
  49. Oh?  Have you ever seen C code written by a former FORTRAN programmer?
  50. If so, by how many?  Universally you will find:
  51.    1) Very short, illegible variable and function names, with the
  52.       first character wasted (all integers must start with 'i', don't
  53.       you know)
  54.    2) No use of structures
  55.    3) No linked lists or trees
  56.    4) No whitespace
  57.    5) Lots of illegible "creative" formulas
  58.    6) No comments
  59.  
  60. As I said in my previous post, the goal a C programmer should have is to
  61. make his program look like Pascal while knowing full well it's just
  62. shorthand for assembly.
  63.  
  64. >
  65. >5) Picking up Assembler prior to learning C isn't a bad idea.
  66. >    Hardly required, tho.
  67.  
  68. It's blase attitudes such as that that are responsible for so many
  69. bug-ridden programs.  Besides allowing one to understand what is
  70. really going on, assembly is necessary for tracking down compiler
  71. bugs.  In my opinion, you cannot be a real C programmer without knowing
  72. assembly.
  73.  
  74. There is just _so_ much involved with learning C fully.  Shortcuts lead
  75. to mediocre proficiency, which leads to disaster in a language as
  76. unforgiving and flexible as C.
  77.  
  78.