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

  1. Xref: sparky alt.msdos.programmer:3011 comp.os.msdos.programmer:11615 comp.sys.ibm.pc.programmer:676 comp.lang.c++:18414 comp.lang.c:18888
  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.070024.15672@grebyn.com>
  7. Organization: Grebyn Timesharing
  8. References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com> <1hdpluINN1lv@agate.berkeley.edu>
  9. Date: Fri, 25 Dec 1992 07:00:24 GMT
  10. Lines: 70
  11.  
  12. In article <1hdpluINN1lv@agate.berkeley.edu> faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher) writes:
  13. >In article <1992Dec24.172333.7339@grebyn.com> malak@grebyn.com (Michael Malak) writes:
  14. >> In my opinion, there is no fast track to either C or C++.  I feel the
  15. >> following must be learned in order:
  16. >>   1) Pascal, with two semesters experience
  17. >
  18. >IMHO, Pascal has nothing useful that C doesn't have, except for array
  19. >bounds checking.  You you use C++ you can use a vector class that
  20. >gives you that.
  21.  
  22. Pascal has the following advantages over C:
  23.  
  24.    1) It has structured syntactic blocks for constants, types and
  25.       variables.
  26.  
  27.    2) It has nested procedures.
  28.  
  29.    3) Most importantly, the good structured programming professors
  30.       wouldn't be caught dead teaching C (biggotry in my opinion).
  31.  
  32. >  I would suggest learning Scheme for a semester or two
  33. >and then moving to C++.
  34.  
  35. Is there an MS-DOS Scheme?
  36.  
  37. >
  38. >>   2) Assembly, learned anywhere, with tinkering on your own
  39. >
  40. >I'm not sure it's so important to really program in assembly.  You
  41. >should understand basic machine architecture, and have some idea of
  42. >what an instruction set looks like, but writing real code, especially
  43. >for a RISC, doesn't teach you all that much.
  44.  
  45. It depends on what you mean by "writing real [assembly] code".  I think
  46. to learn anything you need to try it at least once.  The programming
  47. assignments in an assembly class would be sufficient, as would be
  48. trying a couple of exercises out of a tutorial book if one were
  49. learning it on his own.
  50.  
  51. >
  52. >>   3) C, 2-3 years min. anywhere (college, real world, or tinkering)
  53. >> After that you can learn and appreciate C++.  You need to first learn
  54. >> structured programming and algorithms, most importantly, linked lists
  55. >> and trees.  Since C is tightly coupled to assembly in many ways (C is a
  56. >> shorthand for assembly, and C integrates easily with assembly modules),
  57. >
  58. >Two point here.  First, you can start with a subset of C++ that is
  59. >close to C, but includes important things such as mandatory function
  60. >prototypes and flexible declaration positioning, and add classes and
  61. >other OO features gradually.  You don't have to jump into multiple
  62. >inheritance the first day.  There are plenty of ways that C++ improved
  63. >on C that don't add much conceptual complexity.
  64.  
  65. Good point.
  66.  
  67. >
  68. >Second, it's not right to call C "shorthand for assembly".  One thing
  69. >you can say about C and C++ is that it discourages language features
  70. >that can't be implemented at compile time, but that doesn't make it
  71. >any closer to assembly than any other compiled language.  And most
  72. >languages "integrate easily with assembly modules", simply because
  73. >that's what compilers produce.
  74.  
  75. BASIC, LISP, and all the other interpretive languages do not integrate
  76. with assembly.  And on many platforms other than MS-DOS you cannot mix
  77. (link) outputs from different compilers.  All in all, most languages on
  78. most platforms do not mix well with assembly.  I know of no C compiler
  79. that cannot link in assembly modules; I cannot say the same for any
  80. other language.
  81.  
  82.