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

  1. Xref: sparky alt.msdos.programmer:3018 comp.os.msdos.programmer:11632 comp.sys.ibm.pc.programmer:680 comp.lang.c++:18437 comp.lang.c:18906
  2. Path: sparky!uunet!wupost!emory!ogicse!sequent!muncher.sequent.com!furballs
  3. From: furballs@sequent.com (Paul Penrod)
  4. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  5. Subject: Re: Newbie Wants Advice on C-Programming
  6. Message-ID: <1992Dec27.012536.7173@sequent.com>
  7. Date: 27 Dec 92 01:25:36 GMT
  8. Article-I.D.: sequent.1992Dec27.012536.7173
  9. References: <1992Dec24.172333.7339@grebyn.com> <1hdpluINN1lv@agate.berkeley.edu> <1992Dec25.070024.15672@grebyn.com>
  10. Sender: usenet@sequent.com (usenet )
  11. Organization: Sequent Computer Systems, Inc.
  12. Lines: 105
  13. Nntp-Posting-Host: crg8.sequent.com
  14.  
  15. In article <1992Dec25.070024.15672@grebyn.com> malak@grebyn.com (Michael Malak) writes:
  16. >In article <1hdpluINN1lv@agate.berkeley.edu> faustus@ygdrasil.CS.Berkeley.EDU (Wayne A. Christopher) writes:
  17. >>In article <1992Dec24.172333.7339@grebyn.com> malak@grebyn.com (Michael Malak) writes:
  18. >>> In my opinion, there is no fast track to either C or C++.  I feel the
  19. >>> following must be learned in order:
  20. >>>   1) Pascal, with two semesters experience
  21. >>
  22. >>IMHO, Pascal has nothing useful that C doesn't have, except for array
  23. >>bounds checking.  You you use C++ you can use a vector class that
  24. >>gives you that.
  25. >
  26. >Pascal has the following advantages over C:
  27. >
  28. >   1) It has structured syntactic blocks for constants, types and
  29. >      variables.
  30. >
  31. >   2) It has nested procedures.
  32. >
  33. >   3) Most importantly, the good structured programming professors
  34. >      wouldn't be caught dead teaching C (biggotry in my opinion).
  35. >
  36.  
  37. Most of the structured programming professors I have had to suffer
  38. with can't program. That's one of the reasons they wouldn't be
  39. caught dead using C. C Presumes you already know what your doing.
  40.  
  41. >>
  42. >>>   2) Assembly, learned anywhere, with tinkering on your own
  43. >>
  44. >>I'm not sure it's so important to really program in assembly.  You
  45. >>should understand basic machine architecture, and have some idea of
  46. >>what an instruction set looks like, but writing real code, especially
  47. >>for a RISC, doesn't teach you all that much.
  48. >
  49. >It depends on what you mean by "writing real [assembly] code".  I think
  50. >to learn anything you need to try it at least once.  The programming
  51. >assignments in an assembly class would be sufficient, as would be
  52. >trying a couple of exercises out of a tutorial book if one were
  53. >learning it on his own.
  54. >
  55.  
  56. Assembly gives one a very detailed view of things. It does not
  57. matter what machine architecture you use. If you decide you really
  58. want to undertand the basic inner workings of your machine and by
  59. extension, how C deals with the underlying details, then by all
  60. means learn assembly.
  61.  
  62. >>
  63. >>>   3) C, 2-3 years min. anywhere (college, real world, or tinkering)
  64. >>> After that you can learn and appreciate C++.  You need to first learn
  65. >>> structured programming and algorithms, most importantly, linked lists
  66. >>> and trees.  Since C is tightly coupled to assembly in many ways (C is a
  67. >>> shorthand for assembly, and C integrates easily with assembly modules),
  68. >>
  69. >>Two point here.  First, you can start with a subset of C++ that is
  70. >>close to C, but includes important things such as mandatory function
  71. >>prototypes and flexible declaration positioning, and add classes and
  72. >>other OO features gradually.  You don't have to jump into multiple
  73. >>inheritance the first day.  There are plenty of ways that C++ improved
  74. >>on C that don't add much conceptual complexity.
  75. >
  76. >Good point.
  77. >
  78.  
  79. That depends. OOP is not for everyone, and especially if you are
  80. trying to understand your machine architecture. Systems people have
  81. very little use for container classes that are nothing more than
  82. reusable code for disposable programmers. Applications people will
  83. find more usuability out of OOP. However, understand that OOP can
  84. be done just as effectively in C as in C++. The trick is proper use
  85. of structures and the understanding of data manipulation under C.
  86. C++ hides much of the dirty work of how this is accomplished. While
  87. it might make for pretty code, I consider it a serious detriment to
  88. the development of a programmer's skills towards their peak
  89. ability.
  90.  
  91. Also C++ suffers from mulitple inheritance and polymorphism, which
  92. causes undue replication of code, from a compiler point of view.
  93.  
  94. >>
  95. >>Second, it's not right to call C "shorthand for assembly".  One thing
  96. >>you can say about C and C++ is that it discourages language features
  97. >>that can't be implemented at compile time, but that doesn't make it
  98. >>any closer to assembly than any other compiled language.  And most
  99. >>languages "integrate easily with assembly modules", simply because
  100. >>that's what compilers produce.
  101. >
  102. >BASIC, LISP, and all the other interpretive languages do not integrate
  103. >with assembly.  And on many platforms other than MS-DOS you cannot mix
  104. >(link) outputs from different compilers.  All in all, most languages on
  105. >most platforms do not mix well with assembly.  I know of no C compiler
  106. >that cannot link in assembly modules; I cannot say the same for any
  107. >other language.
  108. >
  109.  
  110. If your going to be in the MS-DOS environment. Learn your C first.
  111. Then worry about integrating assembly calls. Almost all languages I
  112. am aware of under MS-DOS allow for this. Learn the basics first.
  113. The rest will be there when you are ready for it.
  114.  
  115. -- 
  116. --------------------------------------------------------------------
  117.             Bureaucracy: noun, plural - Bureaucracies.
  118.          The process of turning energy into solid waste.
  119. ---------------------------------------------------------------------
  120.